Thanks to visit codestin.com
Credit goes to github.com

Skip to content

add option to preventDefault on scroll #222

@ianhi

Description

@ianhi

With #109 the ability to respond to scroll events was brought back. However, later on the preventDefault was removed from the event handling code. So using https://gist.github.com/tacaswell/3144287 to implement scroll to zoom results in both zooming in and the whole notebook scrolling:
scrolling

Is there an easy way as a user to add back the ability to capture scroll? If not, could an option be added (default false for consistency) to capture scrolling events?

Relevant code is here:

mouse_event(name) {

I'm not sure where on the python side would be correct allow setting of an boolean for toggling capturing scroll as figure objects in other backends don't have this problem. Maybe there could be a toggle inside fig.canvas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions