Make sure color objects are passed to change events also on color components.

This commit is contained in:
Jürg Lehni 2013-11-24 00:53:12 +01:00
parent 8f66f8ac61
commit f7a473a598

View file

@ -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());
}
},