Skip to content

Commit 074fe03

Browse files
committed
Fix minor gapbutton issues
1 parent c917381 commit 074fe03

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

src/components/updatemenus/draw.js

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -431,16 +431,23 @@ function findDimenstions(gd, menuOpts) {
431431
if(menuOpts.orientation === 'v') {
432432
menuOpts.totalWidth = Math.max(menuOpts.totalWidth, wEff);
433433
menuOpts.openWidth = menuOpts.totalWidth;
434-
menuOpts.totalHeight += hEff;
435-
menuOpts.openHeight += hEff;
434+
menuOpts.totalHeight += hEff + constants.gapButton;
435+
menuOpts.openHeight += hEff + constants.gapButton;
436436
} else {
437-
menuOpts.totalWidth += wEff;
438-
menuOpts.openWidth += wEff;
437+
menuOpts.totalWidth += wEff + constants.gapButton;
438+
menuOpts.openWidth += wEff + constants.gapButton;
439439
menuOpts.totalHeight = Math.max(menuOpts.totalHeight, hEff);
440440
menuOpts.openHeight = menuOpts.totalHeight;
441441
}
442442
});
443443

444+
if(menuOpts.orientation === 'v') {
445+
menuOpts.totalHeight -= constants.gapButton;
446+
} else {
447+
menuOpts.totalWidth -= constants.gapButton;
448+
}
449+
450+
444451
menuOpts.headerWidth = menuOpts.width1 + constants.arrowPadX;
445452
menuOpts.headerHeight = menuOpts.height1;
446453

0 commit comments

Comments
 (0)