From d727ea19e478ff72494691368ae86e704aebb941 Mon Sep 17 00:00:00 2001 From: portree_kid Date: Thu, 6 Feb 2020 22:22:32 +0100 Subject: [PATCH] Switch HoldType --- src/renderer/components/EditLayer.vue | 24 +++++++++++++++++++++++- src/renderer/loaders/HoldNode.js | 8 +++++++- 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/src/renderer/components/EditLayer.vue b/src/renderer/components/EditLayer.vue index c606fb5..4934a1e 100644 --- a/src/renderer/components/EditLayer.vue +++ b/src/renderer/components/EditLayer.vue @@ -208,6 +208,21 @@ // We shouldn't have a RunwayNode element.removeFrom(layerGroup); this.featureLookup[nIndex].splice(index,1); + } else { + var fa_icon; + if (this.$store.state.Editable.data.node.holdPointType === 'PushBack') { + fa_icon = "
"; + } else if (this.$store.state.Editable.data.node.holdPointType === 'normal') { + fa_icon = "
"; + } + const icon = new L.DivIcon({ + className: 'custom-div-icon', + html: fa_icon, + iconSize: [30, 42], + iconAnchor: [15, 42] + }); + + element.setIcon(icon); } hasHoldPointNode = true; } @@ -223,6 +238,7 @@ } }) if (!hasRunwayNode && isOnRunway) { + this.$store.state.Editable.data.node.holdPointType const icon = new L.DivIcon({ className: 'custom-div-icon', html: "
", @@ -236,9 +252,15 @@ node.addListeners(); } if (!hasHoldPointNode && isHoldPoint) { + var fa_icon = null; + if (this.$store.state.Editable.data.node.holdPointType === 'PushBack') { + fa_icon = "
"; + } else if (this.$store.state.Editable.data.node.holdPointType === 'normal') { + fa_icon = "
"; + } const icon = new L.DivIcon({ className: 'custom-div-icon', - html: "
", + html: fa_icon, iconSize: [30, 42], iconAnchor: [15, 42] }); diff --git a/src/renderer/loaders/HoldNode.js b/src/renderer/loaders/HoldNode.js index 15b145b..7d893e8 100644 --- a/src/renderer/loaders/HoldNode.js +++ b/src/renderer/loaders/HoldNode.js @@ -71,9 +71,15 @@ L.HoldNode = L.Marker.extend({ var holdNode = function (n, layerGroup) { //console.log(n.attr('lat') + " " + n.attr('lon')); var latlon = convert(n.attr('lat') + " " + n.attr('lon')); + var fa_icon = null; + if (n.attr('holdPointType') === 'PushBack') { + fa_icon = "
"; + } else if (n.attr('holdPointType') === 'normal') { + fa_icon = "
"; + } const icon = new L.DivIcon({ className: 'custom-div-icon', - html: "
", + html: fa_icon, iconSize: [30, 42], iconAnchor: [15, 42] });