From 426e77a2529be987159d302a89bd8e4a5cb39f1c Mon Sep 17 00:00:00 2001 From: Oliver Jowett Date: Sun, 24 Jul 2016 16:58:13 +0100 Subject: [PATCH] Don't choke when selecting positionless planes in the table. --- public_html/planeObject.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/public_html/planeObject.js b/public_html/planeObject.js index 13be440..44abb47 100644 --- a/public_html/planeObject.js +++ b/public_html/planeObject.js @@ -392,7 +392,7 @@ PlaneObject.prototype.clearMarker = function() { // Update our marker on the map PlaneObject.prototype.updateMarker = function(moved) { - if (!this.visible) { + if (!this.visible || this.position == null) { this.clearMarker(); return; } @@ -414,7 +414,10 @@ PlaneObject.prototype.updateMarker = function(moved) { PlaneObject.prototype.updateLines = function() { if (!this.selected) return; - + + if (this.track_linesegs.length == 0) + return; + var estimateStyle = new ol.style.Style({ stroke: new ol.style.Stroke({ color: '#a08080',