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

Fix handling of negative Shape.Rectangle sizes #1733

Merged
merged 1 commit into from
Nov 9, 2019

Conversation

adroitwhiz
Copy link
Contributor

@adroitwhiz adroitwhiz commented Nov 9, 2019

Description

This PR fixes the handling of negative Shape.Rectangle sizes by taking the absolute value of the shape's size to calculate the shape's new radius in Shape.setSize.

Related issues

Resolves #1245

Checklist

  • New tests added or existing tests modified to cover all changes
  • Code conforms with the JSHint rules (npm run jshint passes)

@adroitwhiz adroitwhiz force-pushed the fix-negative-shape-size branch 2 times, most recently from 7cd045c to f96c43e Compare November 9, 2019 03:18
@lehni
Copy link
Member

lehni commented Nov 9, 2019

Great, thank you for the flawless PR!

@lehni lehni merged commit 7dad1a4 into paperjs:develop Nov 9, 2019
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.

Shape.Rectangle(point, size) draws Circle in some cases
2 participants