From 6547eb2ad53d9df97a08210d7edb6d849e59d998 Mon Sep 17 00:00:00 2001 From: Nicoleta Panaghiu Date: Mon, 12 Aug 2024 11:15:53 +0300 Subject: [PATCH] RED-9777: fixed viewer header alignment + added components view parent. --- src/lib/help-mode/help-mode.service.ts | 1 + src/lib/help-mode/utils/constants.ts | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib/help-mode/help-mode.service.ts b/src/lib/help-mode/help-mode.service.ts index 6345b7c..38cc90c 100644 --- a/src/lib/help-mode/help-mode.service.ts +++ b/src/lib/help-mode/help-mode.service.ts @@ -242,6 +242,7 @@ export class HelpModeService { const iframe: HTMLIFrameElement = document.getElementById(PDF_TRON_IFRAME_ID) as HTMLIFrameElement; const iframeRect = iframe.getBoundingClientRect(); dimensions.y += iframeRect.top; + dimensions.x += iframeRect.left; } helper.helperElement.style.cssText = ` diff --git a/src/lib/help-mode/utils/constants.ts b/src/lib/help-mode/utils/constants.ts index 5804db5..b0cbf3e 100644 --- a/src/lib/help-mode/utils/constants.ts +++ b/src/lib/help-mode/utils/constants.ts @@ -9,7 +9,7 @@ export const PDF_TRON_IFRAME_ID = 'webviewer-1'; export const WEB_VIEWER_ELEMENTS = [ { querySelector: '.HeaderItems', - documentKey: 'pdf_features', + documentKey: 'document_viewer_features', }, ]; @@ -18,6 +18,7 @@ export const ScrollableParentViews = { ANNOTATIONS_LIST: 'ANNOTATIONS_LIST', SCM_EDIT_DIALOG: 'SCM_EDIT_DIALOG', WORKFLOW_VIEW: 'WORKFLOW_VIEW', + COMPONENTS_VIEW: 'COMPONENTS_VIEW', } as const; export const SCROLLABLE_PARENT_VIEWS_IDS = { @@ -25,6 +26,7 @@ export const SCROLLABLE_PARENT_VIEWS_IDS = { ANNOTATIONS_LIST: 'annotations-list', SCM_EDIT_DIALOG: 'scm-edit', WORKFLOW_VIEW: 'workflow-view', + COMPONENTS_VIEW: 'components-view', } as const; export type ScrollableParentView = keyof typeof ScrollableParentViews;