element dynamic position calculation updated in js, #5

This commit is contained in:
Alexander Dyuzhev 2023-09-08 15:46:42 +03:00
parent f74fb63760
commit 58c1c1e1e9

View File

@ -186,7 +186,12 @@
if (!eBoxLast) return;
if (isOnHigherLevel(eBoxLast, eBox)) {
//setYTrans(eBox, yTrans(eBoxLast)+"+(AbstractSymbol.MAX_HEIGHT+AbstractSymbol.Y_INDENT)+");\n"+
setYTrans(eBox, yTrans(eBoxLast)+%HEIGHT_SUM%);
var attDescHeight = eBoxLast.getAttribute('data-desc-height');
var descHeight = Number(attDescHeight);
var heightAddon = 0;
if(descHeight) heightAddon = descHeight;
setYTrans(eBox, yTrans(eBoxLast)+%HEIGHT_SUM%+heightAddon);
var parent = getParent(eBox);
var line = document.getElementById('p'+eBox.id);
if (!parent || !line) return;