From 6d38401f0c9c02010f71d250f4a852bb56adff42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Tue, 25 Jun 2013 09:58:18 -0700 Subject: [PATCH] Use faster direct Curve constructor instead of Base.create(). --- src/path/Path.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/path/Path.js b/src/path/Path.js index 168c46c0..e58d1afe 100644 --- a/src/path/Path.js +++ b/src/path/Path.js @@ -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); }