diff --git a/ui-ngx/src/app/modules/home/components/widget/widget-container.component.ts b/ui-ngx/src/app/modules/home/components/widget/widget-container.component.ts index 5c32a3ec30..7c8e3c12ea 100644 --- a/ui-ngx/src/app/modules/home/components/widget/widget-container.component.ts +++ b/ui-ngx/src/app/modules/home/components/widget/widget-container.component.ts @@ -283,17 +283,9 @@ export class WidgetContainerComponent extends PageComponent implements OnInit, O functionPosition: (instance, helper, position) => { const clientRect = helper.origin.getBoundingClientRect(); const container = parent.getBoundingClientRect(); - position.coord.left = clientRect.right - position.size.width - container.left; + position.coord.left = Math.max(0,clientRect.right - position.size.width - container.left); position.coord.top = position.coord.top - container.top; position.target = clientRect.right; - const rightOverflow = container.right - (position.coord.left + position.size.width); - if (rightOverflow < 0) { - position.coord.left += rightOverflow; - } - const leftOverflow = container.left - position.coord.left; - if (leftOverflow > 0) { - position.coord.left += leftOverflow; - } return position; }, functionReady: (_instance, helper) => {