Skip to content

Commit ef5210e

Browse files
committed
updatemenus: hide scrollbar if header clicked
1 parent 563009b commit ef5210e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/components/updatemenus/draw.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,8 @@ function drawButtons(gd, gHeader, gButton, menuOpts) {
259259
exit.remove();
260260
}
261261

262+
// if folding a dropdown menu, don't draw the buttons
263+
if(!buttons.size()) return;
262264

263265
var x0 = 0;
264266
var y0 = 0;
@@ -607,6 +609,11 @@ function setItemPosition(item, menuOpts, posOpts, overrideOpts) {
607609

608610
function removeAllButtons(gButton) {
609611
gButton.selectAll('g.' + constants.dropdownButtonClassName).remove();
612+
613+
// remove scrollbox
614+
gButton.selectAll('rect.scrollbar-horizontal').remove();
615+
gButton.selectAll('rect.scrollbar-vertical').remove();
616+
gButton.call(Drawing.setClipUrl, null);
610617
}
611618

612619
function clearPushMargins(gd) {

0 commit comments

Comments
 (0)