From 1587ac857dd043b5e97bc64b850e0a6f864c9f26 Mon Sep 17 00:00:00 2001 From: Jonathan Puckey Date: Fri, 6 May 2011 15:51:26 +0100 Subject: [PATCH] Simplify Circles example. --- examples/Tools/Circles.html | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/examples/Tools/Circles.html b/examples/Tools/Circles.html index d2271405..787cc4b7 100644 --- a/examples/Tools/Circles.html +++ b/examples/Tools/Circles.html @@ -16,17 +16,13 @@ var path; function onMouseDrag(event) { - if (path) path.remove(); // The radius is the distance between the position // where the user clicked and the current position // of the mouse. var radius = (event.downPoint - event.point).length; path = new Path.Circle(event.downPoint, radius); + path.removeOnDrag(); }; - - function onMouseUp(event) { - path = null; - }