From 281047e2cc5d622c183ca46e7acb8782baa9f8c8 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Tue, 9 Aug 2022 15:17:49 +0200 Subject: [PATCH] Keep the original outerNode top offset as we need it later for NM height calculations --- api/js/etemplate/Layout/Et2Split/Et2Split.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/js/etemplate/Layout/Et2Split/Et2Split.ts b/api/js/etemplate/Layout/Et2Split/Et2Split.ts index c77f79fd18..b0d8628ecc 100644 --- a/api/js/etemplate/Layout/Et2Split/Et2Split.ts +++ b/api/js/etemplate/Layout/Et2Split/Et2Split.ts @@ -129,11 +129,12 @@ export class Et2Split extends Et2Widget(SlotMixin(SlSplitPanel)) // TODO: When dynheight goes away, this can too if(typeof widget.dynheight !== "undefined") { + let outerNodetopOffset = widget.dynheight.outerNode.offset().top; widget.dynheight.outerNode = { // Random 3px deducted to make things fit better. Otherwise nm edges are hidden width: () => parseInt(getComputedStyle(this.shadowRoot.querySelector(".start")).width) - 3, height: () => parseInt(getComputedStyle(this.shadowRoot.querySelector(".start")).height) - 3, - offset: () => 0 + offset: () => {return {top:outerNodetopOffset}} }; widget.dynheight._collectBottomNodes = function() {