From 5a2bbd64633274fafa71717fb048c2f37f8af8a4 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Thu, 9 Feb 2023 11:26:25 +0100 Subject: [PATCH] Adjust details container calculation for overlaySummary based on left/right alignment --- api/js/etemplate/Layout/Et2Details/Et2Details.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/api/js/etemplate/Layout/Et2Details/Et2Details.ts b/api/js/etemplate/Layout/Et2Details/Et2Details.ts index abda915f91..e9ceaba950 100644 --- a/api/js/etemplate/Layout/Et2Details/Et2Details.ts +++ b/api/js/etemplate/Layout/Et2Details/Et2Details.ts @@ -63,11 +63,14 @@ export class Et2Details extends Et2Widget(SlDetails) max-height: 15em; overflow-y: auto; } - .details.hoist .details__body.overlaySummary { + .details.hoist .details__body.overlaySummaryLeftAligned { top: 0; left: 2em; width: calc(100% - 2em); } + .details.hoist .details__body.overlaySummaryRightAligned { + top: 0; + } `, ]; } @@ -149,7 +152,8 @@ export class Et2Details extends Et2Widget(SlDetails) } if (this.overlaySummaryOnOpen) { - this.shadowRoot.querySelector('.details__body').classList.add('overlaySummary'); + this.shadowRoot.querySelector('.details__body').classList.add(this.toggleAlign === 'left' ? + 'overlaySummaryLeftAligend' : 'overlaySummaryRightAligned'); } }); }