Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add getZoomLevel function #536

Merged
merged 1 commit into from
Jun 28, 2021
Merged

Add getZoomLevel function #536

merged 1 commit into from
Jun 28, 2021

Conversation

kurkle
Copy link
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
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