mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-08-28 22:08:54 -04:00
Support insert parameter again in #toShape() / #toPath()
This commit is contained in:
parent
060ab5e7f9
commit
c0a2e0ec63
2 changed files with 4 additions and 2 deletions
|
@ -180,7 +180,8 @@ var Shape = Item.extend(/** @lends Shape# */{
|
|||
// Respect the setting of paper.settings.applyMatrix for new paths:
|
||||
if (paper.settings.applyMatrix)
|
||||
path.setApplyMatrix(true);
|
||||
path.insertAbove(this);
|
||||
if (insert)
|
||||
path.insertAbove(this);
|
||||
return path;
|
||||
},
|
||||
|
||||
|
|
|
@ -1504,7 +1504,8 @@ var Path = PathItem.extend(/** @lends Path# */{
|
|||
shape._matrix.preConcatenate(this._matrix);
|
||||
// Determine and apply the shape's angle of rotation.
|
||||
shape.rotate(topCenter.subtract(center).getAngle() + 90);
|
||||
shape.insertAbove(this);
|
||||
if (insert)
|
||||
shape.insertAbove(this);
|
||||
return shape;
|
||||
}
|
||||
return null;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue