Selection of new Polys

This commit is contained in:
portree_kid 2020-03-01 21:49:07 +01:00
parent b84536a004
commit bff3af2c52

View File

@ -44,7 +44,11 @@ exports.extendTaxiSegment = function (taxiwaySegment) {
this.on('click', function (event) {
event.target.setStyle({color : 'red'});
console.log("Click : " + event.target);
if (store.default.state.Editable.data.arc !== event.target.options.attributes) {
if (store.default.state.Editable.data.arc === undefined ||
store.default.state.Editable.data.arc !== event.target.options.attributes) {
if(event.target.options.attributes === undefined) {
event.target.options.attributes = {};
}
event.target.options.attributes.index = event.target._leaflet_id;
event.target.options.attributes.selected = true;
store.default.dispatch('setArc', event.target.options.attributes);