Rename ChangeFlags.PATH to GEOMETRY.

This commit is contained in:
Jürg Lehni 2011-05-16 00:01:06 +01:00
parent 690a79722f
commit 3a15360efc
4 changed files with 10 additions and 10 deletions

View file

@ -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
};

View file

@ -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;
}
},

View file

@ -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;

View file

@ -69,7 +69,7 @@ var Segment = this.Segment = Base.extend({
}
}
}
this._path._changed(ChangeFlags.PATH);
this._path._changed(ChangeFlags.GEOMETRY);
}
},