From e1bb0a23e7abeba6d1d17d53d002db256d5a8c0c Mon Sep 17 00:00:00 2001 From: Jonathan Puckey Date: Thu, 22 Nov 2012 20:05:01 +0100 Subject: [PATCH] Fix RadialRainbows example. The example stopped working, because we were changing values on another gradient colour object than the one used by the path: the color is cloned when passed to path.fillColor --- examples/Animated/RadialRainbows.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/Animated/RadialRainbows.html b/examples/Animated/RadialRainbows.html index fc0d54e3..40ea3bca 100644 --- a/examples/Animated/RadialRainbows.html +++ b/examples/Animated/RadialRainbows.html @@ -20,8 +20,8 @@ var path = new Path.Rectangle(view.bounds); var gradient = new Gradient(colors, 'radial'); var radius = Math.max(view.size.width, view.size.height) * 0.75; - var gradientColor = new GradientColor(gradient, point, point + [radius, 0]); - path.fillColor = gradientColor; + path.fillColor = new GradientColor(gradient, point, point + [radius, 0]); + var gradientColor = path.fillColor; var mouseDown = false, mousePoint = view.center;