From 39106cfb7014921c5c59947221d18f6b8cb5f268 Mon Sep 17 00:00:00 2001 From: Ya-Fan Chen Date: Fri, 26 Jul 2024 02:53:24 +0200 Subject: [PATCH 1/2] fix wrong scrollBoxY value for legend scroll --- src/components/legend/draw.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/legend/draw.js b/src/components/legend/draw.js index 8e7abcf29fa..033d39fb241 100644 --- a/src/components/legend/draw.js +++ b/src/components/legend/draw.js @@ -337,7 +337,7 @@ function drawOne(gd, opts) { legend.on('wheel', function() { scrollBoxY = Lib.constrain( legendObj._scrollY + - ((d3.event.deltaY / scrollBarYMax) * scrollBoxYMax), + ((d3.event.deltaY / scrollBoxYMax) * scrollBarYMax), 0, scrollBoxYMax); scrollHandler(scrollBoxY, scrollBarHeight, scrollRatio); if(scrollBoxY !== 0 && scrollBoxY !== scrollBoxYMax) { From 6b6daee163a2ecc00b532d18fec93449b6d328c0 Mon Sep 17 00:00:00 2001 From: Ya-Fan Chen Date: Fri, 26 Jul 2024 03:03:17 +0200 Subject: [PATCH 2/2] Create 7067_fix.md --- draftlogs/7067_fix.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 draftlogs/7067_fix.md diff --git a/draftlogs/7067_fix.md b/draftlogs/7067_fix.md new file mode 100644 index 00000000000..4ebaedae0d9 --- /dev/null +++ b/draftlogs/7067_fix.md @@ -0,0 +1 @@ +Fix wrong scrolling behavior for legend [[#7067](https://github.com/plotly/plotly.js/pull/7067)]