-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
108 lines (108 loc) · 3.53 KB
/
index.html
File metadata and controls
108 lines (108 loc) · 3.53 KB
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.7.4/css/bulma.min.css"
/>
<link rel="stylesheet" href="style.css" />
<title>Gesture Based Drawing</title>
</head>
<body>
<section class="hero is-light is-fullheight">
<div class="hero-body">
<div id="app">
<div class="field is-grouped shapes">
<a
class="image is-48x48"
:class="{ 'is-selected': shape === 'line' }"
@click="shape = 'line'"
>
<img src="./assets/icons8-line-48.png" alt="line" />
</a>
<a
class="image is-48x48"
:class="{ 'is-selected': shape === 'triangle' }"
@click="shape = 'triangle'"
>
<img src="./assets/icons8-triangle-48.png" alt="triangle" />
</a>
<a
class="image is-48x48"
:class="{ 'is-selected': shape === 'rectangle' }"
@click="shape = 'rectangle'"
>
<img src="./assets/icons8-rectangular-48.png" alt="rectangle" />
</a>
<a
class="image is-48x48"
:class="{ 'is-selected': shape === 'circle' }"
@click="shape = 'circle'"
>
<img src="./assets/icons8-circle-48.png" alt="circle" />
</a>
</div>
<div class="field is-grouped">
<div
class="color"
:class="{ 'is-selected': color === 'black' }"
style="background: black"
@click="color = 'black'"
></div>
<div
class="color"
:class="{ 'is-selected': color === 'red' }"
style="background: red"
@click="color = 'red'"
></div>
<div
class="color"
:class="{ 'is-selected': color === 'orange' }"
style="background: orange"
@click="color = 'orange'"
></div>
<div
class="color"
:class="{ 'is-selected': color === 'yellow' }"
style="background: yellow"
@click="color = 'yellow'"
></div>
<div
class="color"
:class="{ 'is-selected': color === 'green' }"
style="background: green"
@click="color = 'green'"
></div>
<div
class="color"
:class="{ 'is-selected': color === 'blue' }"
style="background: blue"
@click="color = 'blue'"
></div>
<div
class="color"
:class="{ 'is-selected': color === 'gray' }"
style="background: gray"
@click="color = 'gray'"
></div>
</div>
<canvas id="drawing-board" width="330px" height="350px" v-pan="onPan">
</canvas>
<button
class="clear button is-danger is-centered"
type="button"
@click="clearCanvas"
>
Clear
</button>
</div>
</div>
</section>
<script src="hammer.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<script src="app.js"></script>
</body>
</html>