Fix GradientStop support in SVG export.

Closes #1027
This commit is contained in:
Jürg Lehni 2016-04-06 20:17:13 -07:00
parent 83a2fa0749
commit ff82e43d2f

View file

@ -231,12 +231,11 @@ new function() {
var stops = gradient._stops; var stops = gradient._stops;
for (var i = 0, l = stops.length; i < l; i++) { for (var i = 0, l = stops.length; i < l; i++) {
var stop = stops[i], var stop = stops[i],
offset = stop._rampPoint,
stopColor = stop._color, stopColor = stop._color,
alpha = stopColor.getAlpha(); alpha = stopColor.getAlpha();
attrs = {}; attrs = {
if (offset != null) offset: stop._rampPoint || i / (l - 1)
attrs.offset = offset; };
if (stopColor) if (stopColor)
attrs['stop-color'] = stopColor.toCSS(true); attrs['stop-color'] = stopColor.toCSS(true);
// See applyStyle for an explanation of why there are separated // See applyStyle for an explanation of why there are separated