Home: Make resize less jumpy

This commit is contained in:
nathan 2023-03-14 11:22:38 -06:00
parent 9421d49ab5
commit c0680a006d

View File

@ -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)));