2011-02-21 14:31:26 +01:00
|
|
|
<!DOCTYPE html>
|
2011-02-08 13:16:43 +01:00
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
|
|
<title>Example</title>
|
2011-05-05 16:25:17 +01:00
|
|
|
<link rel="stylesheet" href="../css/style.css">
|
2011-03-08 01:07:26 +00:00
|
|
|
<script type="text/javascript">var root = '../../'</script>
|
2011-03-07 23:11:41 +00:00
|
|
|
<script type="text/javascript" src="../../src/load.js"></script>
|
2011-03-04 12:38:38 +01:00
|
|
|
<script type="text/paperscript" canvas="canvas">
|
2011-04-23 16:30:29 +02:00
|
|
|
// All newly created items will receive
|
|
|
|
// these style properties:
|
2011-05-16 13:33:15 +01:00
|
|
|
project.currentStyle = {
|
2011-04-23 16:30:29 +02:00
|
|
|
fillColor: 'white',
|
|
|
|
strokeColor: 'black'
|
|
|
|
};
|
|
|
|
|
2011-02-12 16:20:10 +01:00
|
|
|
var path;
|
2011-03-04 12:38:38 +01:00
|
|
|
function onMouseDrag(event) {
|
2011-04-23 16:30:29 +02:00
|
|
|
// 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);
|
2011-05-06 15:51:26 +01:00
|
|
|
path.removeOnDrag();
|
2011-03-04 12:38:38 +01:00
|
|
|
};
|
2011-02-08 13:16:43 +01:00
|
|
|
</script>
|
|
|
|
</head>
|
|
|
|
<body>
|
2011-05-14 13:04:02 +03:00
|
|
|
<canvas id="canvas" resize keepalive="true"></canvas>
|
2011-02-08 13:16:43 +01:00
|
|
|
</body>
|