8000 Passthrough the wheel event if the scrollbar is at the very top or bottom by rpaskowitz · Pull Request #1588 · plotly/plotly.js · GitHub
[go: up one dir, main page]

Skip to content

Passthrough the wheel event if the scrollbar is at the very top or bottom #1588

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 13, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Passthrough the wheel event if the scrollbar is at the very top or bo…
…ttom of the box.
  • Loading branch information
rpaskowitz committed Apr 12, 2017
commit 23c7afc8a57ed9d25a2f250a52dc89d956967015
4 changes: 3 additions & 1 deletion src/components/legend/draw.js
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,9 @@ module.exports = function draw(gd) {
scrollBarY = constants.scrollBarMargin -
scrollBoxY / scrollBoxYMax * scrollBarYMax;
scrollHandler(scrollBarY, scrollBoxY);
d3.event.preventDefault();
if(scrollBoxY !== 0 && scrollBoxY !== -scrollBoxYMax) {
d3.event.preventDefault();
}
});

// to be safe, remove previous listeners
Expand Down
0