From c0680a006d8cce0a07d286e097da9eb7f3607f33 Mon Sep 17 00:00:00 2001 From: nathan Date: Tue, 14 Mar 2023 11:22:38 -0600 Subject: [PATCH] Home: Make resize less jumpy --- api/js/etemplate/Et2Portlet/Et2Portlet.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/api/js/etemplate/Et2Portlet/Et2Portlet.ts b/api/js/etemplate/Et2Portlet/Et2Portlet.ts index f699f7e960..baa9ffe142 100644 --- a/api/js/etemplate/Et2Portlet/Et2Portlet.ts +++ b/api/js/etemplate/Et2Portlet/Et2Portlet.ts @@ -351,6 +351,10 @@ export class Et2Portlet extends Et2Widget(SlCard) target.style.height = ""; target.removeAttribute('data-x'); target.removeAttribute('data-y'); + if(o_x == "auto") + { + o_x = "" + (1 + Math.round((this.getBoundingClientRect().left - this.parentElement.getBoundingClientRect().left) / parentDimensions.x)); + } let col = Math.max(1, (dx + (parseInt(o_x) || 0))); let row = Math.max(1, (dy + (parseInt(o_y) || 0)));