mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -05:00
Use faster direct Curve constructor instead of Base.create().
This commit is contained in:
parent
9c5416360c
commit
6d38401f0c
1 changed files with 3 additions and 3 deletions
|
@ -360,10 +360,10 @@ var Path = PathItem.extend(/** @lends Path# */{
|
|||
curves.splice.apply(curves, [from, 0].concat(segs._curves));
|
||||
start += segs._curves.length;
|
||||
}
|
||||
// Insert new curves, but do not initialize them yet, since
|
||||
// #_adjustCurves() handles all that for us.
|
||||
// Insert new curves, but do not initialize their segments yet,
|
||||
// since #_adjustCurves() handles all that for us.
|
||||
for (var i = start; i < to; i++)
|
||||
curves.splice(i, 0, Base.create(Curve));
|
||||
curves.splice(i, 0, new Curve(this, null, null));
|
||||
// Adjust segments for the curves before and after the removed ones
|
||||
this._adjustCurves(from, to);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue