mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-05 20:32:00 -05:00
Add comments.
This commit is contained in:
parent
3a232b305e
commit
08571fd399
1 changed files with 11 additions and 0 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue