From f63cb407233974540b8e67659587edf25a1a2d45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Wed, 16 Oct 2013 15:09:23 +0200 Subject: [PATCH] Fix SVG error in importing transformed gradients with highlights. --- src/style/Color.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/style/Color.js b/src/style/Color.js index 263b179d..01c33a14 100644 --- a/src/style/Color.js +++ b/src/style/Color.js @@ -804,7 +804,8 @@ var Color = Base.extend(new function() { var radius = destination.getDistance(origin), highlight = components[3]; if (highlight) { - var vector = highlight.subtract(translation).subtract(origin); + highlight = highlight.subtract(translation); + var vector = highlight.subtract(origin); if (vector.getLength() > radius) highlight = origin.add(vector.normalize(radius - 0.1)); }