Skip to content

isZoomedOrPanned incorrectly returns true on initial render #629

Closed
@joshkel

Description

@joshkel

isZoomedOrPanned incorrectly returns true when a chart is first rendered, before the chartjs-plugin-zoom plugin does anything.

Steps to reproduce: See https://codesandbox.io/s/is-zoomed-xo90ep.

  1. Click the "Check zoom" button and note that it incorrectly reports true.
  2. Click and drag somewhere on the chart. This invokes the chartjs-plugin-zoom plugin by trying to do a pan operation, but nothing happens, because the chart is already at its limits.
  3. Click the "Check zoom" button and note that it correctly reports false.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions