mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-22 07:19:57 -05:00
Add test code for segments list that detects change.
This commit is contained in:
parent
fc0d3efd29
commit
74167ff28d
1 changed files with 12 additions and 0 deletions
|
@ -38,6 +38,18 @@ var Path = this.Path = PathItem.extend({
|
|||
var length = segments.length;
|
||||
if (!this._segments) {
|
||||
this._segments = new Array(length);
|
||||
/*
|
||||
this._segments = Base.each(
|
||||
['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'],
|
||||
function(name) {
|
||||
var prev = this[name];
|
||||
this[name] = function() {
|
||||
return prev.apply(this, arguments);
|
||||
}
|
||||
},
|
||||
new Array(length)
|
||||
);
|
||||
*/
|
||||
} else {
|
||||
this._segments.length = length;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue