Skip to content

Feature request: allow handleZoom to filter out ctrl-Click or cmd-Click  #24

@rsaccon

Description

@rsaccon

When clicking on an image with cmd key pressed (or ctrl on windows), I am performing a different action than zooming. So I had to customize the handleZoom (I filtered out for all possible keyEvents):

  handleZoom(event) {
    if (!event.ctrlKey && !event.metaKey && !event.shiftKey && !event.altKey) {
      this.setState({ isZoomed: true })
    }
  }

Can we integrate this (or maybe an improved approach where one can provide an optional list which keys need to be filtered) ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions