-
Notifications
You must be signed in to change notification settings - Fork 77
/
index.html
96 lines (69 loc) · 3.16 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
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
<!DOCTYPE html>
<html>
<head>
<!-- <link rel="stylesheet" href="compiled/css/font/font-awesome.css" type="text/css" media="screen" title="no title" charset="utf-8"> -->
<link rel="stylesheet" href="vendor/jquery.contextMenu/jquery.contextMenu.css" type="text/css" media="screen" title="no title" charset="utf-8">
<link rel="stylesheet" href="compiled/css/style.css" type="text/css" media="screen" title="no title" charset="utf-8">
<title>Recursive Drawing</title>
</head>
<body>
<script type="text/html" id="component-template">
<div class="component" data-bind="css: {highlighted: $root.isHighlighted(componentPath), top: componentPath.length == 0}">
<div class="mini">
<div data-bind="if: componentPath.length > 0">
<div class="disclosure" data-bind="css: {collapsed: rootDefinition.ui.isCollapsed(componentPath), expanded: rootDefinition.ui.isExpanded(componentPath)}, click: rootDefinition.ui.toggleExpanded"></div>
</div>
<canvas data-bind="canvas: rootDefinition, componentPath: componentPath"></canvas>
</div>
</div>
<div data-bind="if: rootDefinition.ui.isExpanded(componentPath)">
<div class="children" data-bind="foreach: $root.children(rootDefinition, componentPath)">
<div data-bind="template: {name: 'component-template', data: {rootDefinition: $parent.rootDefinition, componentPath: $parent.componentPath.concat($data)}}"></div>
</div>
</div>
</script>
<script type="text/html" id="main-template">
<div id="workspace">
<canvas id="workspaceCanvas" data-bind="canvas: focus()"></canvas>
<canvas id="drawFurther" data-bind="css: {hidden: mouseOver()}"></canvas>
<canvas id="forSaving"></canvas>
<div class="filler"></div>
</div>
<div id="sidebar">
<div id="definitions" data-bind="foreach: definitions">
<div class="definition mini" data-bind="css: {focused: $data === $root.focus()}">
<canvas data-bind="canvas: $data"></canvas>
<div class="filler"></div>
</div>
</div>
<button class="button" id="addDefinition">+</button>
</div>
<div id="sidebarRight">
<div id="components" data-bind="css: {hidden: $root.focus().components().length == 0}">
<div data-bind="template: { name: 'component-template', data: {rootDefinition: $root.focus(), componentPath: []} }"></div>
</div>
</div>
<div id="dragHint">
Drag
</div>
<div id="ghostHint" class="mini" data-bind="visible: ghostHint">
<canvas id="ghostHintCanvas"></canvas>
</div>
</script>
<div data-bind="template: {name: 'main-template', data: $data}"></div>
<script src="vendor/numeric-1.0.2.min.js"></script>
<script src="vendor/underscore-min.js"></script>
<script src="vendor/keymaster.min.js"></script>
<script src="vendor/rAF.js"></script>
<script src="vendor/jquery-1.7.2.min.js"></script>
<script src="vendor/jquery.mousewheel.js"></script>
<script src="vendor/jquery.contextMenu/jquery.contextMenu.js"></script>
<script src="vendor/jquery.contextMenu/jquery.ui.position.js"></script>
<script src="vendor/knockout-2.0.0.js"></script>
<script src="vendor/stats.js"></script>
<script src="compiled/app.js"></script>
<script>
require("app")();
</script>
</body>
</html>