Skip to content

Commit 1509728

Browse files
authored
Merge pull request #1588 from rpaskowitz/passthrough_legend_scroll
Passthrough the wheel event if the scrollbar is at the very top or bottom
2 parents fbcc03a + 23c7afc commit 1509728

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/components/legend/draw.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,9 @@ module.exports = function draw(gd) {
269269
scrollBarY = constants.scrollBarMargin -
270270
scrollBoxY / scrollBoxYMax * scrollBarYMax;
271271
scrollHandler(scrollBarY, scrollBoxY);
272-
d3.event.preventDefault();
272+
if(scrollBoxY !== 0 && scrollBoxY !== -scrollBoxYMax) {
273+
d3.event.preventDefault();
274+
}
273275
});
274276

275277
// to be safe, remove previous listeners

0 commit comments

Comments
 (0)