Improve comments about change notifications.

This commit is contained in:
Jürg Lehni 2011-08-23 16:36:57 +02:00
parent 7a5ca5609f
commit ae116cd043
2 changed files with 4 additions and 0 deletions

View file

@ -51,6 +51,7 @@ var Item = this.Item = Base.extend(/** @lends Item# */{
if (flags & ChangeFlag.APPEARANCE) { if (flags & ChangeFlag.APPEARANCE) {
this._project._needsRedraw(); this._project._needsRedraw();
} }
// If this item is a symbol's definition, notify it of the change too
if (this._parentSymbol) if (this._parentSymbol)
this._parentSymbol._changed(flags); this._parentSymbol._changed(flags);
}, },

View file

@ -73,6 +73,9 @@ var Style = Item.extend({
if (value) if (value)
value._addOwner(this._item); value._addOwner(this._item);
} }
// Notify the item of the style change STYLE is
// always set, additional flags come from _flags,
// as used for STROKE:
if (this._item) if (this._item)
this._item._changed(flags[key] || Change.STYLE); this._item._changed(flags[key] || Change.STYLE);
} }