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; - }