From 9b50020721e84fd5fe4a1b60f24dbb3b10a8679b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Tue, 9 Apr 2013 08:35:42 -0700 Subject: [PATCH] Check for gradient Colors correctly. --- src/path/Path.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/path/Path.js b/src/path/Path.js index d8ff945e..fee49120 100644 --- a/src/path/Path.js +++ b/src/path/Path.js @@ -313,10 +313,10 @@ var Path = this.Path = PathItem.extend(/** @lends Path# */{ var style = this._style, fillColor = style._fillColor, strokeColor = style._strokeColor; - // Try calling transform on colors in case they are GradientColors. - if (fillColor && fillColor.transform) + // Try calling transform on colors in case they are gradients. + if (fillColor && fillColor._type === 'gradient') fillColor.transform(matrix); - if (strokeColor && strokeColor.transform) + if (strokeColor && strokeColor._type === 'gradient') strokeColor.transform(matrix); return true; },