summaryrefslogtreecommitdiff
path: root/public/assets/javascripts/rectangles/engine/shapes/polyline.js
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2015-08-21 12:55:44 -0400
committerJules Laplace <jules@okfoc.us>2015-08-21 12:55:44 -0400
commit62c899384b0cf4aab6288f662e12f11321de95df (patch)
tree1eb1963e5bf5e24e6f89b0e0ddc8ce0d48144de2 /public/assets/javascripts/rectangles/engine/shapes/polyline.js
parentca76295998fb75e9ab9c83ee9a1a694b9e0656c1 (diff)
getting full coverage with rooms
Diffstat (limited to 'public/assets/javascripts/rectangles/engine/shapes/polyline.js')
-rw-r--r--public/assets/javascripts/rectangles/engine/shapes/polyline.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/public/assets/javascripts/rectangles/engine/shapes/polyline.js b/public/assets/javascripts/rectangles/engine/shapes/polyline.js
index 99c8fda..6c64128 100644
--- a/public/assets/javascripts/rectangles/engine/shapes/polyline.js
+++ b/public/assets/javascripts/rectangles/engine/shapes/polyline.js
@@ -47,7 +47,7 @@ var Polyline = Fiber.extend(function(base){
return null
}
exports.hasEndPointNear = function(p){
- if (this.closed) return null
+ if (this.closed || ! this.points.length) return null
if (this.firstPoint().distanceTo( p ) < 10/map.zoom) {
return this.firstPoint()
}