/
index.html
33 lines (28 loc) · 1.32 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
<!doctype html>
<html>
<head>
<title>AnguDraw 1.0</title>
<script src="node_modules/angular/angular.min.js"></script>
<script src="script/vendor/fabric.min.js"></script>
<script src="script/angudraw.js"></script>
<link src="styles.css" />
</head>
<body ng-app="AnguDraw">
<div ng-controller="Main.Controller as ctrl">
<canvas
id="myCanvas"
width="500"
height="500"
style="border:1px solid #000000;">
</canvas>
<button ng-click="ctrl.AddNewRectangle()">Add a Rectangle</button>
<button ng-click="ctrl.AddNewCircle()">Add a Circle</button>
<div ng-repeat="colour in ctrl.ColourPalette" class="palleteBox" style="width: 20px; background-color: {{colour}};" ng-click="ctrl.SetColour(colour)"> </div>
Current colour: <div style="width: 30px; height: 30px; background-color: {{ctrl.CurrentSelectedColour}}"> </div>
<button ng-click="ctrl.SaveItems()">Save!</button>
<button ng-click="ctrl.ClearAllItems()">Clear!</button>
<button ng-click="ctrl.ReloadSavedItems()">Reload!</button>
<button ng-click="ctrl.ToggleDrawingMode()">Free Draw ({{ctrl.canvas.isDrawingMode}})!</button>
</div>
</body>
</html>