summaryrefslogtreecommitdiff
path: root/public/assets/javascripts/rectangles
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2015-08-26 16:24:31 -0400
committerJules Laplace <jules@okfoc.us>2015-08-26 16:29:26 -0400
commit8ce3e6347b75a653ed3b7e4e3b2be5f23c841e97 (patch)
tree91850e3296fdd4ec65a1412b1d98b2241e1d52b1 /public/assets/javascripts/rectangles
parent0e03cb3c4065e002be50d37e80ddfab1407c8e6b (diff)
show start position
Diffstat (limited to 'public/assets/javascripts/rectangles')
-rw-r--r--public/assets/javascripts/rectangles/engine/map/draw.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/public/assets/javascripts/rectangles/engine/map/draw.js b/public/assets/javascripts/rectangles/engine/map/draw.js
index 8498a46..fd05f86 100644
--- a/public/assets/javascripts/rectangles/engine/map/draw.js
+++ b/public/assets/javascripts/rectangles/engine/map/draw.js
@@ -252,7 +252,13 @@ Map.Draw = function(map, opt){
draw.x_at = function x_at (x, z, length){
ctx.save()
- ctx.translate(x,z)
+ if (x && 'x' in x) {
+ length = z
+ ctx.translate(x.x,x.z)
+ }
+ else {
+ ctx.translate(x,z)
+ }
var len = (length/2 || 4) / map.zoom