Don't choke when selecting positionless planes in the table.

This commit is contained in:
Oliver Jowett 2016-07-24 16:58:13 +01:00
parent 4305c99b01
commit 426e77a252

View file

@ -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',