Skip to content

Commit 23c7afc

Browse files
committed
Passthrough the wheel event if the scrollbar is at the very top or bottom of the box.
1 parent 00355fb commit 23c7afc

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)