Skip to content

[ENH]: Allow for capturing scroll in webagg backend #26032

Open
@ianhi

Description

@ianhi

Problem

As reported in mpl-extensions/mpl-pan-zoom#8 by @antoniovazquezblanco the webagg backend (and I suspect also the nbagg backend) have no option to enable capturing scroll events. This means that it is impossible to implement scroll to zoom methods without also scrolling the page.

Proposed solution

Add an optional way to have the canvas capture mouse wheel events like we do in ipympl: https://github.com/matplotlib/ipympl/blob/9b85cab605c960365e4f217589f8aa7ac6c31274/src/mpl_widget.ts#L547-L551

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions