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

Check that zoom reference point is valid before using it #247

Merged
merged 3 commits into from
Oct 8, 2013

Conversation

jmnetus
Copy link
Contributor

@jmnetus jmnetus commented Oct 4, 2013

We had a case where the final division in calculating the reference point turned into an effective divide-by-zero (floating point precision error, mumble mumble), resulting in an invalid reference point and images blanking out due to the invalid reference point. This commit simply checks that the reference point isn't NaN before using it.

@iangilman
Copy link
Member

Excellent! Could you add a similar check to the part of zoomBy() that uses refPoint?

@jmnetus
Copy link
Contributor Author

jmnetus commented Oct 4, 2013

New commit should do the same check before trying to rotate the refPoint in zoomBy, let me know if you see anything else

@iangilman
Copy link
Member

Awesome, thank you!

iangilman added a commit that referenced this pull request Oct 8, 2013
Check that zoom reference point is valid before using it
@iangilman iangilman merged commit 45ee823 into openseadragon:master Oct 8, 2013
iangilman added a commit that referenced this pull request Oct 8, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants