Switch HoldType
This commit is contained in:
parent
00aac46a27
commit
d727ea19e4
@ -208,6 +208,21 @@
|
|||||||
// We shouldn't have a RunwayNode
|
// We shouldn't have a RunwayNode
|
||||||
element.removeFrom(layerGroup);
|
element.removeFrom(layerGroup);
|
||||||
this.featureLookup[nIndex].splice(index,1);
|
this.featureLookup[nIndex].splice(index,1);
|
||||||
|
} else {
|
||||||
|
var fa_icon;
|
||||||
|
if (this.$store.state.Editable.data.node.holdPointType === 'PushBack') {
|
||||||
|
fa_icon = "<div style='background-color:#4838cc;' class='marker-pin'></div><i class='fas fa-arrows-alt-h'></i>";
|
||||||
|
} else if (this.$store.state.Editable.data.node.holdPointType === 'normal') {
|
||||||
|
fa_icon = "<div style='background-color:#4838cc;' class='marker-pin'></div><i class='fas fa-hand-paper'></i>";
|
||||||
|
}
|
||||||
|
const icon = new L.DivIcon({
|
||||||
|
className: 'custom-div-icon',
|
||||||
|
html: fa_icon,
|
||||||
|
iconSize: [30, 42],
|
||||||
|
iconAnchor: [15, 42]
|
||||||
|
});
|
||||||
|
|
||||||
|
element.setIcon(icon);
|
||||||
}
|
}
|
||||||
hasHoldPointNode = true;
|
hasHoldPointNode = true;
|
||||||
}
|
}
|
||||||
@ -223,6 +238,7 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
if (!hasRunwayNode && isOnRunway) {
|
if (!hasRunwayNode && isOnRunway) {
|
||||||
|
this.$store.state.Editable.data.node.holdPointType
|
||||||
const icon = new L.DivIcon({
|
const icon = new L.DivIcon({
|
||||||
className: 'custom-div-icon',
|
className: 'custom-div-icon',
|
||||||
html: "<div style='background-color:#4838cc;' class='marker-pin'></div><i class='fas fa-plane-departure'></i>",
|
html: "<div style='background-color:#4838cc;' class='marker-pin'></div><i class='fas fa-plane-departure'></i>",
|
||||||
@ -236,9 +252,15 @@
|
|||||||
node.addListeners();
|
node.addListeners();
|
||||||
}
|
}
|
||||||
if (!hasHoldPointNode && isHoldPoint) {
|
if (!hasHoldPointNode && isHoldPoint) {
|
||||||
|
var fa_icon = null;
|
||||||
|
if (this.$store.state.Editable.data.node.holdPointType === 'PushBack') {
|
||||||
|
fa_icon = "<div style='background-color:#4838cc;' class='marker-pin'></div><i class='fas fa-arrows-alt-h'></i>";
|
||||||
|
} else if (this.$store.state.Editable.data.node.holdPointType === 'normal') {
|
||||||
|
fa_icon = "<div style='background-color:#4838cc;' class='marker-pin'></div><i class='fas fa-hand-paper'></i>";
|
||||||
|
}
|
||||||
const icon = new L.DivIcon({
|
const icon = new L.DivIcon({
|
||||||
className: 'custom-div-icon',
|
className: 'custom-div-icon',
|
||||||
html: "<div style='background-color:#4838cc;' class='marker-pin'></div><i class='fas fa-hand-paper'></i>",
|
html: fa_icon,
|
||||||
iconSize: [30, 42],
|
iconSize: [30, 42],
|
||||||
iconAnchor: [15, 42]
|
iconAnchor: [15, 42]
|
||||||
});
|
});
|
||||||
|
@ -71,9 +71,15 @@ L.HoldNode = L.Marker.extend({
|
|||||||
var holdNode = function (n, layerGroup) {
|
var holdNode = function (n, layerGroup) {
|
||||||
//console.log(n.attr('lat') + " " + n.attr('lon'));
|
//console.log(n.attr('lat') + " " + n.attr('lon'));
|
||||||
var latlon = convert(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 = "<div style='background-color:#4838cc;' class='marker-pin'></div><i class='fas fa-arrows-alt-h'></i>";
|
||||||
|
} else if (n.attr('holdPointType') === 'normal') {
|
||||||
|
fa_icon = "<div style='background-color:#4838cc;' class='marker-pin'></div><i class='fas fa-hand-paper'></i>";
|
||||||
|
}
|
||||||
const icon = new L.DivIcon({
|
const icon = new L.DivIcon({
|
||||||
className: 'custom-div-icon',
|
className: 'custom-div-icon',
|
||||||
html: "<div style='background-color:#4838cc;' class='marker-pin'></div><i class='fas fa-hand-paper'></i>",
|
html: fa_icon,
|
||||||
iconSize: [30, 42],
|
iconSize: [30, 42],
|
||||||
iconAnchor: [15, 42]
|
iconAnchor: [15, 42]
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user