Vertex deselect
This commit is contained in:
parent
98ff3a92aa
commit
1d048c0d28
@ -51,6 +51,24 @@ exports.extendTaxiSegment = function (taxiwaySegment) {
|
|||||||
this.getLatLngs().forEach( element => {
|
this.getLatLngs().forEach( element => {
|
||||||
if (Number(element.glueindex) === store.default.state.Editable.index) {
|
if (Number(element.glueindex) === store.default.state.Editable.index) {
|
||||||
if (element.__vertex._icon != null) {
|
if (element.__vertex._icon != null) {
|
||||||
|
element.__vertex.__proto__.deselect = function () {
|
||||||
|
if (this._icon != null) {
|
||||||
|
this._icon.style.setProperty('background-color','white');
|
||||||
|
this._icon.style.setProperty('color','white');
|
||||||
|
} else if (this.icon != null) {
|
||||||
|
if (this.icon.style != null) {
|
||||||
|
this.icon.style['background-color'] = 'white';
|
||||||
|
} else {
|
||||||
|
this.setStyle({ color: 'white' })
|
||||||
|
}
|
||||||
|
} else if (this.options.icon != null) {
|
||||||
|
if (this.options.icon.style != null) {
|
||||||
|
this.options.icon.style['background-color'] = 'white';
|
||||||
|
} else {
|
||||||
|
this.options.icon._setIconStyles({ color: 'white' })
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
element.__vertex._icon.style.setProperty('background-color','red');
|
element.__vertex._icon.style.setProperty('background-color','red');
|
||||||
element.__vertex._icon.style.setProperty('color','red');
|
element.__vertex._icon.style.setProperty('color','red');
|
||||||
} else if (element.__vertex !== undefined && element.__vertex.icon != null) {
|
} else if (element.__vertex !== undefined && element.__vertex.icon != null) {
|
||||||
@ -181,6 +199,7 @@ exports.extendTaxiSegment = function (taxiwaySegment) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
if (!this.editor.map.editTools.drawing()) {
|
||||||
var hold = this.featureLookup[event.vertex.latlng.glueindex].filter(n => n instanceof L.HoldNode);
|
var hold = this.featureLookup[event.vertex.latlng.glueindex].filter(n => n instanceof L.HoldNode);
|
||||||
if (hold.length > 0) {
|
if (hold.length > 0) {
|
||||||
hold[0].select();
|
hold[0].select();
|
||||||
@ -193,6 +212,7 @@ exports.extendTaxiSegment = function (taxiwaySegment) {
|
|||||||
store.default.dispatch('setNode', event.vertex.latlng)
|
store.default.dispatch('setNode', event.vertex.latlng)
|
||||||
this.selectVertex()
|
this.selectVertex()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
var dragIndex = -1;
|
var dragIndex = -1;
|
||||||
this.on('editable:vertex:dragstart', function (event) {
|
this.on('editable:vertex:dragstart', function (event) {
|
||||||
|
Loading…
Reference in New Issue
Block a user