mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -05:00
Make sure color objects are passed to change events also on color components.
This commit is contained in:
parent
8f66f8ac61
commit
f7a473a598
1 changed files with 3 additions and 1 deletions
|
@ -64,6 +64,8 @@ var Component = Base.extend(Callback, /** @lends Component# */{
|
|||
type: 'color',
|
||||
|
||||
getValue: function(value) {
|
||||
// Always convert internal string representation back to a
|
||||
// paper.js color object.
|
||||
return new Color(value);
|
||||
},
|
||||
|
||||
|
@ -165,7 +167,7 @@ var Component = Base.extend(Callback, /** @lends Component# */{
|
|||
if (this._value !== value) {
|
||||
this._value = value;
|
||||
if (!_dontFire)
|
||||
this.fire('change', value);
|
||||
this.fire('change', this.getValue());
|
||||
}
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue