-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
49 lines (46 loc) · 2.98 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
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<title>Fabric.Js Free Drawing for Whiteboard </title>
<link rel='stylesheet' href='https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css'>
<link rel="stylesheet" href="./style.css">
</head>
<body>
<hr>
<button onclick="createCanvas()"><i class="fa fa-plus-circle"></i>Create Canvas</button>
<button onclick="addRect()"><i class="fa fa-square"></i>Add Rect</button>
<button onclick="addCircle()"><i class="fa fa-circle"></i>Add Circle</button>
<button onclick="addTriangle()"><i class="fa fa-caret-up"></i>Add Triangle</button>
<button onclick="addPath()"><i class="fa fa-star"></i>Add Path</button>
<button onclick="addText()"><i class="fa fa-font"></i>Add Text</button>
<button onclick="addImage()"><i class="fa fa-font"></i>Add Image</button>
<button onclick="addGroup()"><i class="fa fa-object-group"></i>Add Group</button>
<button onclick="makeGroup()"><i class="fa fa-object-group"></i>Make Group</button>
<button onclick="makeUngroup()"><i class="fa fa-object-group"></i>Make Ungroup</button>
<button onclick="sendToBack()"><i class="fa fa-object-group"></i>send To Back</button>
<button onclick="bringToFront()"><i class="fa fa-object-group"></i>bring To Front</button>
<button onclick="sendBackwards()"><i class="fa fa-object-group"></i>send Backwards</button>
<button onclick="bringForward()"><i class="fa fa-object-group"></i>bring Forward</button>
<button onclick="cleanCanvas()"><i class="fa fa-trash"></i>Clean Canvas</button>
<button onclick="pen()"><i class="fa fa-pencil"></i>Pen Mode</button>
<button onclick="highlighter()"><i class="fa fa-magic"></i>Highlight Mode</button>
<button onclick="selection()"><i class="fa fa-mouse-pointer"></i>Selection Mode</button>
<button onclick="eraser()"><i class="fa fa-eraser"></i>Eraser Mode</button>
<button onclick="zoomIn()"><i class="fa fa-plus-circle"></i>Zoom In</button>
<button onclick="zoomOut()"><i class="fa fa-plus-circle"></i>Zoom Out</button>
<button onclick="zoomReset()"><i class="fa fa-plus-circle"></i>Zoom Reset</button>
<button onclick="deleteCanvas()"><i class="fa fa-minus-circle"></i>Delete Canvas</button>
<button onclick="saveCanvas()"><i class="fa fa-disk-circle"></i>Save as Picture</button>
<button onclick="alert(generateUUID())"><i class="fa fa-arrow"></i>GET UUID</button>
<input onchange="openImage(this)" id="file-upload" type="file" name="file" accept="image/*"/>
<hr>
<div>Thickness: <input id="thickness" value="7" max="50" min="1" type="range" onchange="changeThickness(value)"></div>
<div>Opacity: <input id="opacity" value="100" max="100" min="1" type="range" onchange="changeOpacity(value)"></div>
<div>Color: <input type="color" value="#ff0000" onchange="changeColor(value)"></div>
<hr>
<!-- <script src='https://cdnjs.cloudflare.com/ajax/libs/fabric.js/4.5.0/fabric.min.js'></script> -->
<script src="./fabric.min.js"></script>
<script src="./script.js"></script>
</body>
</html>