From ba63b0157f04d2aa11ff4f2e9ba5bbe3271b9086 Mon Sep 17 00:00:00 2001 From: Ulrich-Matthias Schäfer Date: Mon, 26 Nov 2018 14:02:02 +0100 Subject: Make color-animation work in all spaces (conversion bugs still there) - Make sure _d is always defined - Clean up object before init - Check space in array - Use passed space instead of space in object if available --- src/modules/optional/sugar.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/modules') diff --git a/src/modules/optional/sugar.js b/src/modules/optional/sugar.js index 3bd61fb..18f3e78 100644 --- a/src/modules/optional/sugar.js +++ b/src/modules/optional/sugar.js @@ -24,7 +24,7 @@ var sugar = { if (typeof o === 'undefined') { return this.attr(m) } - if (typeof o === 'string' || Color.isRgb(o) || (o instanceof Element)) { + if (typeof o === 'string' || o instanceof Color || Color.isRgb(o) || (o instanceof Element)) { this.attr(m, o) } else { // set all attributes from sugar.fill and sugar.stroke list -- cgit v1.2.3