Skip to content

Commit f3c8f56

Browse files
committed
Repair resize handling
Use width and height properties were never stored back
1 parent 40e23f9 commit f3c8f56

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

modules/base/BasePainter.mjs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -524,8 +524,8 @@ class BasePainter {
524524
}
525525

526526
let rect_origin = getElementRect(main_origin, true),
527-
can_resize = main_origin.attr('can_resize'),
528-
do_resize = false;
527+
can_resize = main_origin.attr('can_resize'),
528+
do_resize = false;
529529

530530
if (can_resize == 'height')
531531
if (height_factor && Math.abs(rect_origin.width * height_factor - rect_origin.height) > 0.1 * rect_origin.width) do_resize = true;
@@ -545,8 +545,8 @@ class BasePainter {
545545
}
546546

547547
let rect = getElementRect(main),
548-
old_h = main.property('draw_height'),
549-
old_w = main.property('draw_width');
548+
old_h = main.property('_jsroot_height'),
549+
old_w = main.property('_jsroot_width');
550550

551551
rect.changed = false;
552552

@@ -558,6 +558,9 @@ class BasePainter {
558558
rect.changed = true;
559559
}
560560

561+
if (rect.changed)
562+
main.property('_jsroot_height', rect.height).property('_jsroot_width', rect.width);
563+
561564
return rect;
562565
}
563566

0 commit comments

Comments
 (0)