-
Notifications
You must be signed in to change notification settings - Fork 12
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
Exception on empty Shape #6
Comments
In discussion, @jonathanolson said: "I should probably assert( bounds.isEmpty() || bounds.isFinite() )". I changed the assertion like you recommended and it seems like it solves the problem. Specifically, I changed the assertion that bounds x is finite and not NaN to: must be empty or finite. After this change, I tested qunit and 2516/2516 test passed (in Win8Chrome), so I will push to master. |
Reassigned to @jonathanolson to verify my change set. |
Do we also need to retain the test for NaN in the bounds? Also, the former test that was replaced just checked the x value for NaN (see 93b822f) |
isFinite( NaN ) is false, so this should work well. Changeset looks good. |
A recent change to scenery causes this exception if I create a path with new Shape():
Uncaught Error: Assertion failed: Infinite bounds given to invalidateSelf
Should I be able to create a Shape/Path as an empty shape with new Shape()?
The text was updated successfully, but these errors were encountered: