Skip to content

Commit 2ec79e7

Browse files
committed
updatemenus: don't setTranslate button container
* Don't `Lib.setTranslate` the button container and update the call to `Lib.setTranslate` for each button accordingly. * This change will let us use `Lib.setTranslate` on the button container to implement a scroll box.
1 parent 18a836d commit 2ec79e7

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/components/updatemenus/draw.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -281,8 +281,8 @@ function drawButtons(gd, gHeader, gButton, menuOpts) {
281281
}
282282

283283
var posOpts = {
284-
x: x0 + menuOpts.pad.l,
285-
y: y0 + menuOpts.pad.t,
284+
x: menuOpts.lx + x0 + menuOpts.pad.l,
285+
y: menuOpts.ly + y0 + menuOpts.pad.t,
286286
yPad: constants.gapButton,
287287
xPad: constants.gapButton,
288288
index: 0,
@@ -314,9 +314,6 @@ function drawButtons(gd, gHeader, gButton, menuOpts) {
314314
});
315315

316316
buttons.call(styleButtons, menuOpts);
317-
318-
// translate button group
319-
Lib.setTranslate(gButton, menuOpts.lx, menuOpts.ly);
320317
}
321318

322319
function setActive(gd, menuOpts, buttonOpts, gHeader, gButton, buttonIndex, isSilentUpdate) {

0 commit comments

Comments
 (0)