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

Suggestion: Add ">0" restriction on height and weight #2

Open
zhuth opened this issue Jun 17, 2016 · 0 comments
Open

Suggestion: Add ">0" restriction on height and weight #2

zhuth opened this issue Jun 17, 2016 · 0 comments

Comments

@zhuth
Copy link

zhuth commented Jun 17, 2016

When scaling shapes with mouse in playground mode, setting height/width to zero (and even negative) is now permitted, but this may entail errors like shapes.js:189 Uncaught IndexSizeError: Failed to execute 'ellipse' on 'CanvasRenderingContext2D': The major-axis radius provided (-1.5) is negative, and the browser will refuse to execute subsequent instructions. To avoid this, a greater-than-zero restriction should be introduced in perhaps in line 18-19 in shapes.js. Or, it would be better to show an explicit error message, so that the users may learn from it what is wrong in their code or operation.

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

No branches or pull requests

1 participant