mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-05 20:32:00 -05:00
Have subclasses of Item call the base version of _changed().
This commit is contained in:
parent
a50f6a23ac
commit
7a90f9260e
2 changed files with 4 additions and 2 deletions
|
@ -75,6 +75,8 @@ var Group = this.Group = Item.extend({
|
|||
},
|
||||
|
||||
_changed: function(flags) {
|
||||
// Don't use base() for reasons of performance.
|
||||
Item.prototype._changed.call(this, flags);
|
||||
if (flags & (ChangeFlag.HIERARCHY | ChangeFlag.CLIPPING)) {
|
||||
// Clear cached clip item whenever hierarchy changes
|
||||
delete this._clipItem;
|
||||
|
|
|
@ -60,9 +60,9 @@ var Path = this.Path = PathItem.extend({
|
|||
},
|
||||
|
||||
_changed: function(flags) {
|
||||
// Don't use base() for reasons of performance.
|
||||
Item.prototype._changed.call(this, flags);
|
||||
if (flags & ChangeFlag.GEOMETRY) {
|
||||
delete this._bounds;
|
||||
delete this._position;
|
||||
delete this._strokeBounds;
|
||||
delete this._length;
|
||||
// Clockwise state becomes undefined as soon as geometry changes.
|
||||
|
|
Loading…
Reference in a new issue