No need to create a new segments array in setSegments, just set length of existing one instead.

This commit is contained in:
Jürg Lehni 2011-03-08 13:00:32 +00:00
parent 7a4e49c5d5
commit 848befe103

View file

@ -42,9 +42,9 @@ var Path = this.Path = PathItem.extend({
},
setSegments: function(segments) {
var l = segments.length;
this._segments = new Array(l);
for(var i = 0; i < l; i++) {
var length = segments.length;
this._segments.length = length;
for(var i = 0; i < length; i++) {
this._segments[i] = Segment.read(segments, i, 1);
}
},