mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -05:00
Shorten code a bit.
This commit is contained in:
parent
5489f7f496
commit
dad30d15ec
1 changed files with 2 additions and 3 deletions
|
@ -429,10 +429,9 @@ new function() {
|
|||
var values = convertValue(value, 'array'),
|
||||
rectangle = Rectangle.create.apply(this, values),
|
||||
size = getSize(svg, 'width', 'height', true),
|
||||
matrix = new Matrix(),
|
||||
scale = size ? rectangle.getSize().divide(size) : 1,
|
||||
offset = rectangle.getPoint();
|
||||
matrix.translate(offset).scale(scale);
|
||||
offset = rectangle.getPoint(),
|
||||
matrix = new Matrix().translate(offset).scale(scale);
|
||||
item.transform(matrix.createInverse());
|
||||
if (size)
|
||||
rectangle.setSize(size);
|
||||
|
|
Loading…
Reference in a new issue