-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
55 lines (55 loc) · 1.02 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.2.1/vue.min.js"></script>
</head>
<body>
<div id="app">
<svg
ref="svg"
@mousedown="mousedown"
@mousemove="mousemove"
@mouseup="mouseup"
>
<circle
v-if="c1"
:fill="fill"
:cx="x1"
:cy="y1"
:r="r1"
/>
<circle
v-if="c2"
:fill="fill"
:cx="x2"
:cy="y2"
:r="r2"
/>
<path
:fill="fill"
:d="path"
/>
<rect
v-if="c2"
height="20"
width="20"
rx="10"
:x="x2 - 10"
:y="y2 - 10"
:fill="fill"
/>
<text
v-if="c2"
ref="text"
:x="x2"
:y="y2 + 5"
fill="white"
text-anchor="middle">9</text>
</svg>
<div class="sprite" v-if="!c2" ref="sprite"></div>
</div>
</body>
</html>