diff options
| -rw-r--r-- | public/assets/javascripts/rectangles/util/mouse.js | 2 | ||||
| -rw-r--r-- | public/assets/test/ortho2.html | 9 |
2 files changed, 7 insertions, 4 deletions
diff --git a/public/assets/javascripts/rectangles/util/mouse.js b/public/assets/javascripts/rectangles/util/mouse.js index 86edf6c..2b98cee 100644 --- a/public/assets/javascripts/rectangles/util/mouse.js +++ b/public/assets/javascripts/rectangles/util/mouse.js @@ -134,7 +134,7 @@ function mouse (opt) { } var x = pos.a, y = pos.b - + if (base.down) { base.cursor.x.b = x base.cursor.y.b = y diff --git a/public/assets/test/ortho2.html b/public/assets/test/ortho2.html index 5609ec3..89a5688 100644 --- a/public/assets/test/ortho2.html +++ b/public/assets/test/ortho2.html @@ -69,6 +69,8 @@ Map.UI.Ortho = function(map){ if (e.ctrlKey || e.which === 3) { if (placing) { // close polyline or cancel + placing = false + add_mx_polyline(points) return } cursor.quantize(1/map.zoom) @@ -153,6 +155,7 @@ $(window).resize(function(){ }) +var wall_height = 100 var placing = false var points, mx_points = [] var shapes = [] @@ -166,7 +169,7 @@ function polyline (points, finished) { map.draw.dot_at(points[0].a, points[0].b, 5) } if (points.length > 1) { - ctx.fillStyle = "#ff0" + ctx.fillStyle = "rgba(255,255,0,0.1)" ctx.strokeStyle = "#f80" ctx.lineWidth = 2 / map.zoom ctx.beginPath() @@ -204,10 +207,10 @@ function add_mx_polyline_face(head, tail){ var angle = atan2( head.b - tail.b, head.a - tail.a ) mx.move({ x: mid_x / 2, - y: 25 + 1, + y: wall_height/2 + 1, z: mid_z / 2, width: ceil(len), - height: 50, + height: wall_height, rotationY: angle }) var hue = abs(round( angle / PI * 90 + 300)) |
