From f7a473a598e1ece8f6d57a8d75e5038a4381ccfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Sun, 24 Nov 2013 00:53:12 +0100 Subject: [PATCH] Make sure color objects are passed to change events also on color components. --- src/ui/Component.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ui/Component.js b/src/ui/Component.js index ca1dfead..545763e2 100644 --- a/src/ui/Component.js +++ b/src/ui/Component.js @@ -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()); } },