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

bug with scale #684

Closed
A11oW opened this issue Apr 24, 2015 · 2 comments
Closed

bug with scale #684

A11oW opened this issue Apr 24, 2015 · 2 comments
Assignees

Comments

@A11oW
Copy link

A11oW commented Apr 24, 2015

var squareSize = new paper.Size(100, 100);
var square = new paper.Path.Rectangle(centre, squareSize);
square.fillColor = 'black';

if I set:
square.scale(0)
and then
square.scale(1)

square disappear
How I can resize square?

@A11oW A11oW changed the title bug with size bug with scale Apr 24, 2015
@A11oW
Copy link
Author

A11oW commented Apr 24, 2015

I found similar issue #558

@lehni lehni self-assigned this May 11, 2015
@lehni
Copy link
Member

lehni commented Jun 15, 2015

This is normal, because a Path item stores its geometry in its Segment objects (Path#segments). Once you scale the path to 0, all Segment points will be on the same position, and the path will be empty.

You can set Item#applyMatrix to false, or use a Shape instead of a Path item.

@lehni lehni closed this as completed Jun 15, 2015
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

2 participants