From 62c899384b0cf4aab6288f662e12f11321de95df Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Fri, 21 Aug 2015 12:55:44 -0400 Subject: getting full coverage with rooms --- public/assets/javascripts/rectangles/engine/shapes/polyline.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'public/assets/javascripts/rectangles/engine/shapes/polyline.js') 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() } -- cgit v1.2.3-70-g09d2