From e0ea0832873d9829320466b905f58009bd00a8a3 Mon Sep 17 00:00:00 2001 From: Alexander Platov Date: Tue, 17 May 2022 13:04:07 +0300 Subject: [PATCH] Position tooltip and edit box in same place. (#1770) Signed-off-by: Alexander Platov --- .../ui/src/components/PanelInstance.svelte | 16 +++++- .../ui/src/components/PopupInstance.svelte | 16 +++++- .../ui/src/components/TooltipInstance.svelte | 4 +- packages/ui/src/popups.ts | 19 +++++-- .../activity-assets/src/tsdoc-metadata.json | 22 +++---- .../src/components/ChannelEditor.svelte | 57 +++++++++++++++++-- 6 files changed, 106 insertions(+), 28 deletions(-) diff --git a/packages/ui/src/components/PanelInstance.svelte b/packages/ui/src/components/PanelInstance.svelte index d80b7ab782..81ba39cc92 100644 --- a/packages/ui/src/components/PanelInstance.svelte +++ b/packages/ui/src/components/PanelInstance.svelte @@ -24,7 +24,11 @@ let modalHTML: HTMLElement let componentInstance: any - let show: boolean = false + + let options: { + show: boolean + direction: string + } = { show: false, direction: 'bottom' } let component: AnySvelteComponent @@ -58,7 +62,7 @@ const fitPopup = (props: PanelProps, contentPanel: HTMLElement): void => { if (modalHTML) { - show = fitPopupElement(modalHTML, props.element, contentPanel) + options = fitPopupElement(modalHTML, props.element, contentPanel) } } @@ -108,7 +112,13 @@ {#if props.element !== 'content'} -