mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-07 13:22:07 -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',
|
type: 'color',
|
||||||
|
|
||||||
getValue: function(value) {
|
getValue: function(value) {
|
||||||
|
// Always convert internal string representation back to a
|
||||||
|
// paper.js color object.
|
||||||
return new Color(value);
|
return new Color(value);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -165,7 +167,7 @@ var Component = Base.extend(Callback, /** @lends Component# */{
|
||||||
if (this._value !== value) {
|
if (this._value !== value) {
|
||||||
this._value = value;
|
this._value = value;
|
||||||
if (!_dontFire)
|
if (!_dontFire)
|
||||||
this.fire('change', value);
|
this.fire('change', this.getValue());
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue