summaryrefslogtreecommitdiff
path: root/public/assets/test/ortho2.html
diff options
context:
space:
mode:
Diffstat (limited to 'public/assets/test/ortho2.html')
-rw-r--r--public/assets/test/ortho2.html9
1 files changed, 8 insertions, 1 deletions
diff --git a/public/assets/test/ortho2.html b/public/assets/test/ortho2.html
index 448f029..ef77256 100644
--- a/public/assets/test/ortho2.html
+++ b/public/assets/test/ortho2.html
@@ -58,7 +58,9 @@ body {
<script src="/assets/javascripts/rectangles/models/rect.js"></script>
<script src="/assets/javascripts/rectangles/models/rect.js"></script>
<script src="/assets/javascripts/rectangles/engine/map/_map.js"></script>
-<script src="/assets/javascripts/rectangles/engine/map/ui_ortho.js"></script>
+<script src="/assets/javascripts/rectangles/engine/map/ui/ortho.js"></script>
+<script src="/assets/javascripts/rectangles/engine/map/tools/_base.js"></script>
+<script src="/assets/javascripts/rectangles/engine/map/tools/arrow.js"></script>
<script src="/assets/javascripts/rectangles/engine/map/draw.js"></script>
<script>
@@ -73,6 +75,7 @@ var MapTool = Fiber.extend(function(base){
move: function(e, cursor){},
drag: function(e, cursor){},
up: function(e, cursor, new_cursor){},
+ cancel: function(){},
}
return exports
})
@@ -150,6 +153,7 @@ var PolylineTool = MapTool.extend(function (base) {
})
var scene, map, controls
+var last_point = new vec2(0,0)
map = new Map ({
type: "ortho",
@@ -161,6 +165,7 @@ map = new Map ({
map.ui.add_tool("arrow", new ArrowTool)
map.ui.add_tool("polyline", new PolylineTool)
map.ui.add_tool("position", new PositionTool)
+map.ui.set_tool("arrow")
$(window).resize(function(){
scene.width = window.innerWidth/2
@@ -174,6 +179,8 @@ var shapes = []
var ctx = map.draw.ctx
var last_point
+shapes.findClosestPoint = function(){}
+
function polyline (points, finished) {
if (! points) return
if (points.length == 1) {