Skip to content

Commit 5c791b4

Browse files
committed
Fix resize behavior after enlarge
1 parent 4e001b2 commit 5c791b4

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

modules/base/BasePainter.mjs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -561,6 +561,12 @@ class BasePainter {
561561
if (rect.changed)
562562
main.property('_jsroot_height', rect.height).property('_jsroot_width', rect.width);
563563

564+
// after change enlarge state always mark main element as resized
565+
if (main_origin.property('did_enlarge')) {
566+
rect.changed = true;
567+
main_origin.property('did_enlarge', false);
568+
}
569+
564570
return rect;
565571
}
566572

@@ -615,7 +621,7 @@ class BasePainter {
615621
enlarge.node().appendChild(main.node().firstChild);
616622

617623
origin.property('use_enlarge', true);
618-
624+
origin.property('did_enlarge', true);
619625
return true;
620626
}
621627
if ((action === false) && (state !== 'off')) {
@@ -625,6 +631,7 @@ class BasePainter {
625631

626632
enlarge.remove();
627633
origin.property('use_enlarge', false);
634+
origin.property('did_enlarge', true);
628635
return true;
629636
}
630637

0 commit comments

Comments
 (0)