Add comments.

This commit is contained in:
Jürg Lehni 2011-06-20 00:03:15 +01:00
parent 3a232b305e
commit 08571fd399

View file

@ -306,18 +306,29 @@ var Color = this.Color = Base.extend(new function() {
}, {
/** @lends Color# */
/**
* Called by various setters whenever a color value changes
*/
_changed: function() {
this._cssString = null;
for (var i = 0, l = this._owners && this._owners.length; i < l; i++)
this._owners[i]._changed(Change.STYLE);
},
/**
* Called by PathStyle whenever this color is used to define an item's style
* This is required to pass on _changed() notifications to the _owners.
*/
_addOwner: function(item) {
if (!this._owners)
this._owners = [];
this._owners.push(item);
},
/**
* Called by PathStyle whenever this color stops being used to define an
* item's style.
*/
_removeOwner: function(item) {
var index = this._owners ? this._owners.indexOf(item) : -1;
if (index != -1) {