Last change
on this file since 28914 was 28914, checked in by ak19, 10 years ago |
Supporting javascript libraries and bespoke code written by Steffan to support the von-sparql user interface
|
File size:
795 bytes
|
Line | |
---|
1 | <!DOCTYPE html>
|
---|
2 | <html>
|
---|
3 | <head>
|
---|
4 | <meta charset="UTF-8">
|
---|
5 | <title>Clouds</title>
|
---|
6 | <link rel="stylesheet" href="../css/style.css">
|
---|
7 | <script type="text/javascript" src="../../dist/paper.js"></script>
|
---|
8 | <script type="text/paperscript" canvas="canvas">
|
---|
9 | // Any newly created item will inherit the following styles:
|
---|
10 | project.currentStyle = {
|
---|
11 | strokeColor: 'black',
|
---|
12 | strokeWidth: 5,
|
---|
13 | strokeJoin: 'round',
|
---|
14 | strokeCap: 'round'
|
---|
15 | };
|
---|
16 |
|
---|
17 | // The user has to drag the mouse at least 30pt before the mouse drag
|
---|
18 | // event is fired:
|
---|
19 | tool.minDistance = 30;
|
---|
20 |
|
---|
21 | var path;
|
---|
22 | function onMouseDown(event) {
|
---|
23 | path = new Path();
|
---|
24 | path.add(event.point);
|
---|
25 | }
|
---|
26 |
|
---|
27 | function onMouseDrag(event) {
|
---|
28 | path.arcTo(event.point, true);
|
---|
29 | }
|
---|
30 | </script>
|
---|
31 | </head>
|
---|
32 | <body>
|
---|
33 | <canvas id="canvas" resize></canvas>
|
---|
34 | </body>
|
---|
35 | </html> |
---|
Note:
See
TracBrowser
for help on using the repository browser.