forked from barais/tpWeb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcanvas.html
107 lines (103 loc) · 4.88 KB
/
canvas.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
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
<!DOCTYPE html>
<html>
<head>
<title>A simple canvas</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css">
<link href="canvas.css" rel="stylesheet" type="text/css">
</head>
<body>
<div class="container">
<div class="row header">
<form>
<div class="mx-button">
<input type="radio" name="mx" id="butLine" checked>
<label for="butLine" unselectable>Line</label>
</div>
<div class="mx-button">
<input type="radio" name="mx" id="butRect">
<label for="butRect" unselectable>Rectangle</label>
</div>
<div class="mx-button">
<input type="radio" name="mx" id="butCircle">
<label for="butCircle" unselectable>Circle</label>
</div>
<div class="mx-button">
<input type="radio" name="mx" id="butOval">
<label for="butOval" unselectable>Oval</label>
</div>
</form>
<div class="block">
<label id="lspinner" for="spinnerWidth" unselectable>Line thick</label>
<input id="spinnerWidth" type="number" min="1" max="50" step="1" value="1" size="4">
</div>
<div class="block">
<label id="lcolour" for="colour" unselectable>Line color</label>
<input id="colour" type="color">
</div>
<div class="block">
<label id="lfillcolour" for="fillcolour" unselectable>Fill color</label>
<input id="fillcolour" type="color">
</div>
<div class="block">
<label id="lunfillcolour"for="unfillcolour" unselectable>Transparent</label>
<input id="unfillcolour" type="checkbox" checked>
</div>
<div class="block">
<label id="ldash" for="dash" unselectable>Line dash</label>
<div class="dropdown block " id="dash">
<button class="btn btn-default btn-xs dropdown-toggle" type="button" data-toggle="dropdown"><canvas class="mcanvas" id="mcanvas"></canvas>
<span class="caret"></span></button>
<ul class="dropdown-menu">
<li><a class="apcanvas" href="#"><canvas class="pcanvas" id="0"></canvas></a></li>
<li><a class="apcanvas" href="#"><canvas class="pcanvas" id="1-2"></canvas></a></li>
<li><a class="apcanvas" href="#"><canvas class="pcanvas" id="5-2"></canvas></a></li>
<li><a class="apcanvas" href="#"><canvas class="pcanvas" id="15"></canvas></a></li>
</ul>
</button>
</div>
<div class="block do">
<div class="mx-button">
<input type="button" name="mxdo" id="butUndo">
<label for="butUndo" unselectable>Undo</label>
</div>
<div class="mx-button">
<input type="button" name="mxdo" id="butRedo">
<label for="butRedo" unselectable>Redo</label>
</div>
</div>
</div>
</div>
<div class="row">
<div class="block" id="canvasDiv">
<canvas class="myCanvas" id="myCanvas"></canvas>
</div>
<div class="block">
<table class="list-unstyled" id="shapeList">
<thead>
<th>#</th>
<th>Type</th>
<th>Thick</th>
<th>Color</th>
<th>Xbegin</th>
<th>Ybegin</th>
<th>Xend</th>
<th>Yend</th>
<th>Width</th>
<th>Height</th>
<th>Radius</th>
<th>Delete</th>
</thead>
<tbody></tbody>
</table>
</div>
</div>
<script src="jquery-2.1.3.min.js" type="text/javascript"></script>
<script src="bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
<script src="model.js" type="text/javascript"></script>
<script src="view.js" type="text/javascript"></script>
<script src="interaction.js" type="text/javascript"></script>
<script src="controller.js" type="text/javascript"></script>
<script src="main.js" type="text/javascript"></script>
</body>
</html>