mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-20 22:39:50 -05:00
Rename ChangeFlags.PATH to GEOMETRY.
This commit is contained in:
parent
690a79722f
commit
3a15360efc
4 changed files with 10 additions and 10 deletions
|
@ -15,8 +15,8 @@
|
|||
*/
|
||||
|
||||
var ChangeFlags = {
|
||||
PATH: 1, // Path geometry
|
||||
STROKE: 2, // Stroke geometry
|
||||
GEOMETRY: 1, // Item geometry (path, bounds)
|
||||
STROKE: 2, // Stroke geometry (excluding color)
|
||||
STYLE: 4, // Fille style or stroke color / dash,
|
||||
HIERARCHY: 8 // Change in item hierarchy
|
||||
};
|
||||
|
|
|
@ -29,7 +29,7 @@ var Item = this.Item = Base.extend({
|
|||
* @param {ChangeFlags} flags describes what exactly has changed.
|
||||
*/
|
||||
_changed: function(flags) {
|
||||
if (flags & ChangeFlags.PATH) {
|
||||
if (flags & ChangeFlags.GEOMETRY) {
|
||||
delete this._position;
|
||||
}
|
||||
},
|
||||
|
|
|
@ -29,7 +29,7 @@ var Path = this.Path = PathItem.extend({
|
|||
},
|
||||
|
||||
_changed: function(flags) {
|
||||
if (flags & ChangeFlags.PATH) {
|
||||
if (flags & ChangeFlags.GEOMETRY) {
|
||||
delete this._length;
|
||||
delete this._bounds;
|
||||
delete this._position;
|
||||
|
@ -118,7 +118,7 @@ var Path = this.Path = PathItem.extend({
|
|||
this._curves[i = length - 1] = Curve.create(this,
|
||||
this._segments[i], this._segments[0]);
|
||||
}
|
||||
this._changed(ChangeFlags.PATH);
|
||||
this._changed(ChangeFlags.GEOMETRY);
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -137,7 +137,7 @@ var Path = this.Path = PathItem.extend({
|
|||
if (this.strokeColor && this.strokeColor.transform)
|
||||
this.strokeColor.transform(matrix);
|
||||
}
|
||||
this._changed(ChangeFlags.PATH);
|
||||
this._changed(ChangeFlags.GEOMETRY);
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -189,7 +189,7 @@ var Path = this.Path = PathItem.extend({
|
|||
curve._segment1 = segments[index + amount];
|
||||
}
|
||||
}
|
||||
this._changed(ChangeFlags.PATH);
|
||||
this._changed(ChangeFlags.GEOMETRY);
|
||||
return segs;
|
||||
},
|
||||
|
||||
|
@ -273,7 +273,7 @@ var Path = this.Path = PathItem.extend({
|
|||
if (last && this._closed && (curve = curves[curves.length - 1]))
|
||||
curve._segment2 = segments[0];
|
||||
}
|
||||
this._changed(ChangeFlags.PATH);
|
||||
this._changed(ChangeFlags.GEOMETRY);
|
||||
return removed;
|
||||
},
|
||||
|
||||
|
@ -399,7 +399,7 @@ var Path = this.Path = PathItem.extend({
|
|||
last1.remove();
|
||||
this.setClosed(true);
|
||||
}
|
||||
this._changed(ChangeFlags.PATH);
|
||||
this._changed(ChangeFlags.GEOMETRY);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -69,7 +69,7 @@ var Segment = this.Segment = Base.extend({
|
|||
}
|
||||
}
|
||||
}
|
||||
this._path._changed(ChangeFlags.PATH);
|
||||
this._path._changed(ChangeFlags.GEOMETRY);
|
||||
}
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue