Skip to content

Add getZoomLevel function#536

Merged
kurkle merged 1 commit intochartjs:masterfrom
kurkle:level
Jun 28, 2021
Merged

Add getZoomLevel function#536
kurkle merged 1 commit intochartjs:masterfrom
kurkle:level

Conversation

@kurkle
Copy link
Copy Markdown
Member

@kurkle kurkle commented Jun 6, 2021

Changes:

  • new getZoomLevel function
  • onZoomComplete call after resetZoom
  • rename chartState to state for consistency
  • utilize valueOrDefault - this could break something, it is not checking for null. @joshkel was there a reason for checking null?

@kurkle kurkle added this to the 1.1.0 milestone Jun 6, 2021
@kurkle kurkle linked an issue Jun 6, 2021 that may be closed by this pull request
@joshkel
Copy link
Copy Markdown
Contributor

joshkel commented Jun 7, 2021

I don't think checking for null is needed; I was mostly being paranoid / overly defensive.

If I'm following the Chart.js code correctly, null can show up for a scale's min and max (see here), however, even if it did, Math.min and Max.max will ignore it, which seems like the desired behavior.

@kurkle kurkle requested a review from jledentu June 8, 2021 05:10
@kurkle kurkle requested a review from etimberg June 21, 2021 05:58
@kurkle kurkle merged commit 5bbacb0 into chartjs:master Jun 28, 2021
@kurkle kurkle deleted the level branch July 1, 2021 05:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Checking if zoom is active

3 participants