Skip to content

Commit bd29c06

Browse files
committed
Allow enlarge if one dimension reduces slightly
Also check minimum size
1 parent 5040929 commit bd29c06

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

scripts/JSRootPainter.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1216,7 +1216,11 @@
12161216
var sz1 = this.main_visible_rect();
12171217
this.enlarge_main('toggle');
12181218
var sz2 = this.main_visible_rect();
1219-
var res = (sz1.height>=sz2.height) && (sz1.width>=sz2.width);
1219+
var res = (sz1.height>10) && (sz1.width>20) &&
1220+
(((sz1.height>=sz2.height) && (sz1.width>=sz2.width)) ||
1221+
((sz1.height>1.5*sz2.height) && (sz1.width>=0.9*sz2.width)) ||
1222+
((sz1.height>0.9*sz2.height) && (sz1.width>1.5*sz2.width)));
1223+
12201224
main.property('can_enlarge', res);
12211225
return res;
12221226
}

0 commit comments

Comments
 (0)