From f554bdce2ab2232c080b4def4f29d8e102aaafb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Tue, 12 Feb 2013 17:05:54 -0800 Subject: [PATCH] Fix issues with SVG gradient export. --- src/svg/SvgExport.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/svg/SvgExport.js b/src/svg/SvgExport.js index cd37346b..cb02f720 100644 --- a/src/svg/SvgExport.js +++ b/src/svg/SvgExport.js @@ -415,18 +415,18 @@ new function() { var stops = gradient._stops; for (var i = 0, l = stops.length; i < l; i++) { var stop = stops[i], - color = stop._color; + stopColor = stop._color; attrs = { offset: stop._rampPoint, - 'stop-color': color.toCss(true) + 'stop-color': stopColor.toCss(true) }; // See applyStyle for an explanation of why there are separated // opacity / color attributes. - if (color.getAlpha() < 1) - attrs['stop-opacity'] = color._alpha; + if (stopColor.getAlpha() < 1) + attrs['stop-opacity'] = stopColor._alpha; gradientNode.appendChild(createElement('stop', attrs)); } - setDefinition(gradient, gradientNode); + setDefinition(color, gradientNode); } return 'url(#' + gradientNode.id + ')'; }