From ae116cd043743a88e86c6f3e7960671c15d81a81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Tue, 23 Aug 2011 16:36:57 +0200 Subject: [PATCH] Improve comments about change notifications. --- src/item/Item.js | 1 + src/style/Style.js | 3 +++ 2 files changed, 4 insertions(+) diff --git a/src/item/Item.js b/src/item/Item.js index bf88a3da..0db84452 100644 --- a/src/item/Item.js +++ b/src/item/Item.js @@ -51,6 +51,7 @@ var Item = this.Item = Base.extend(/** @lends Item# */{ if (flags & ChangeFlag.APPEARANCE) { this._project._needsRedraw(); } + // If this item is a symbol's definition, notify it of the change too if (this._parentSymbol) this._parentSymbol._changed(flags); }, diff --git a/src/style/Style.js b/src/style/Style.js index 9dd61960..ccbd9bf1 100644 --- a/src/style/Style.js +++ b/src/style/Style.js @@ -73,6 +73,9 @@ var Style = Item.extend({ if (value) 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) this._item._changed(flags[key] || Change.STYLE); }