From ea180219f6cf485eae69978d0f50453772e7c5bf Mon Sep 17 00:00:00 2001 From: Igor Kulikov Date: Mon, 23 Sep 2024 13:36:24 +0300 Subject: [PATCH] UI: Fix widget edit tooltip positioning. --- .../components/widget/widget-container.component.ts | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) 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) => {