Better point selection
This commit is contained in:
parent
46091aa7db
commit
32c0cbd33b
@ -25,12 +25,12 @@ script:
|
|||||||
deploy:
|
deploy:
|
||||||
skip_cleanup: true
|
skip_cleanup: true
|
||||||
overwrite: true
|
overwrite: true
|
||||||
name: '0.0.12'
|
name: '0.0.13'
|
||||||
provider: releases
|
provider: releases
|
||||||
api_key:
|
api_key:
|
||||||
secure: Xm3z86gQmpSajvlXSVgG7mxcaS5K7GfE4HrARIDR4pQ4UguQ3/fFOenRyKAQImmH0kLCSIbVE21NMAQ3YI2F9El9I6GU7Wirccsg14TZZiBQAzKOTXZ+JsBloeBxuTOsR84SkO6pV8OT/pRnQd9frqyc1W7wzoX+0sQykMztXCNfI+1MXXGOAgMzlKuDMO1PVENz0V63mWipL/Mae/SyrHa1Bws+4LJKvv42m0HMKdN7ekt41vxcSUvLmN+YLlqUEVr/eUhQXUNCaWlmM0KxmfuzTedca5/1yzLvN8smEt2I2b0DFRM3Mi/QdI22fVRHs6XGpm8yqZRKmhySDXFspXKWBiuCF6AezX6NiIe/ZUh10gIukjkyLtrNk/o29qhj2WE9HJz4xhsGMAx3632cLSMPku5ALN7jv5scWjwCGNHs4ZeZyyePMeGM6Y6pje1uJPbxWGjwoV6iI4Y4esP+z3KcXvZdnzkpYMy2mzdT4gf7A7zieax1YwB6U/MEanXYKFBH4yzYK9+hx3ck2eLT3LcV/ChHN2bKmERJdf18h+zI8e5YKTzd3/kHLiUUv19N2a4TUYloGOyzrLwn2VD1Xm4jJVVLTIQvWbH5YK7cNkHYa4+PnsB+JppSoby7HiBcothw4OLpJO8eCMqXcPRU1n+cRAZTB7VOS7pWh8e8LFE=
|
secure: Xm3z86gQmpSajvlXSVgG7mxcaS5K7GfE4HrARIDR4pQ4UguQ3/fFOenRyKAQImmH0kLCSIbVE21NMAQ3YI2F9El9I6GU7Wirccsg14TZZiBQAzKOTXZ+JsBloeBxuTOsR84SkO6pV8OT/pRnQd9frqyc1W7wzoX+0sQykMztXCNfI+1MXXGOAgMzlKuDMO1PVENz0V63mWipL/Mae/SyrHa1Bws+4LJKvv42m0HMKdN7ekt41vxcSUvLmN+YLlqUEVr/eUhQXUNCaWlmM0KxmfuzTedca5/1yzLvN8smEt2I2b0DFRM3Mi/QdI22fVRHs6XGpm8yqZRKmhySDXFspXKWBiuCF6AezX6NiIe/ZUh10gIukjkyLtrNk/o29qhj2WE9HJz4xhsGMAx3632cLSMPku5ALN7jv5scWjwCGNHs4ZeZyyePMeGM6Y6pje1uJPbxWGjwoV6iI4Y4esP+z3KcXvZdnzkpYMy2mzdT4gf7A7zieax1YwB6U/MEanXYKFBH4yzYK9+hx3ck2eLT3LcV/ChHN2bKmERJdf18h+zI8e5YKTzd3/kHLiUUv19N2a4TUYloGOyzrLwn2VD1Xm4jJVVLTIQvWbH5YK7cNkHYa4+PnsB+JppSoby7HiBcothw4OLpJO8eCMqXcPRU1n+cRAZTB7VOS7pWh8e8LFE=
|
||||||
file_glob: true
|
file_glob: true
|
||||||
file: build/*
|
file: build/*
|
||||||
on:
|
on:
|
||||||
branches: '0.0.12'
|
branches: '0.0.13'
|
||||||
repo: Portree-Kid/flightgear-airports
|
repo: Portree-Kid/flightgear-airports
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "flightgear-airports",
|
"name": "flightgear-airports",
|
||||||
"version": "0.0.12",
|
"version": "0.0.13",
|
||||||
"author": "portree_kid <keith.paterson@gmx.de>",
|
"author": "portree_kid <keith.paterson@gmx.de>",
|
||||||
"description": "An software to design Flightgear groundnets",
|
"description": "An software to design Flightgear groundnets",
|
||||||
"license": "GPL v3",
|
"license": "GPL v3",
|
||||||
|
@ -343,6 +343,9 @@
|
|||||||
}
|
}
|
||||||
}).filter(n => n);
|
}).filter(n => n);
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
setPointCoords (index, coordinates) {
|
setPointCoords (index, coordinates) {
|
||||||
var position = new Coordinates(coordinates);
|
var position = new Coordinates(coordinates);
|
||||||
|
|
||||||
@ -372,15 +375,20 @@
|
|||||||
element.getLatLngs()[0].update(latlng);
|
element.getLatLngs()[0].update(latlng);
|
||||||
element.setLatLngs(element.getLatLngs());
|
element.setLatLngs(element.getLatLngs());
|
||||||
element.updateBeginVertex(latlng);
|
element.updateBeginVertex(latlng);
|
||||||
|
element.editor.refresh();
|
||||||
|
element.editor.reset();
|
||||||
element.updateMiddle();
|
element.updateMiddle();
|
||||||
}
|
}
|
||||||
if (Number(element.end) === Number(index)) {
|
if (Number(element.end) === Number(index)) {
|
||||||
element.getLatLngs()[element.getLatLngs().length - 1].update(latlng);
|
element.getLatLngs()[element.getLatLngs().length - 1].update(latlng);
|
||||||
element.setLatLngs(element.getLatLngs());
|
element.setLatLngs(element.getLatLngs());
|
||||||
element.updateEndVertex(latlng);
|
element.updateEndVertex(latlng);
|
||||||
|
element.editor.refresh();
|
||||||
|
element.editor.reset();
|
||||||
element.updateMiddle();
|
element.updateMiddle();
|
||||||
}
|
}
|
||||||
} else if (element instanceof L.Editable.VertexMarker) {
|
} else if (element instanceof L.Editable.VertexMarker) {
|
||||||
|
/*
|
||||||
console.log(element);
|
console.log(element);
|
||||||
element.setLatLng(latlng);
|
element.setLatLng(latlng);
|
||||||
element.latlngs.forEach((latlng1, index) => {
|
element.latlngs.forEach((latlng1, index) => {
|
||||||
@ -391,6 +399,7 @@
|
|||||||
});
|
});
|
||||||
element.editor.feature.setLatLngs(element.latlngs);
|
element.editor.feature.setLatLngs(element.latlngs);
|
||||||
element.editor.feature.updateMiddle();
|
element.editor.feature.updateMiddle();
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -608,8 +617,13 @@
|
|||||||
*/
|
*/
|
||||||
},
|
},
|
||||||
editedArc() {
|
editedArc() {
|
||||||
if (!this.groundnetLayerGroup)
|
if (!this.groundnetLayerGroup ||
|
||||||
|
this.$store.state.Editable.index === undefined ||
|
||||||
|
this.$store.state.Editable.data.arc === undefined ||
|
||||||
|
this.featureLookup===undefined ||
|
||||||
|
!this.editing) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
var arc = this.groundnetLayerGroup.getLayer(this.$store.state.Editable.index);
|
var arc = this.groundnetLayerGroup.getLayer(this.$store.state.Editable.index);
|
||||||
if (arc && arc instanceof L.Polyline) {
|
if (arc && arc instanceof L.Polyline) {
|
||||||
console.log('Edited Arc : ' + this.$store.state.Editable.index);
|
console.log('Edited Arc : ' + this.$store.state.Editable.index);
|
||||||
@ -679,6 +693,8 @@
|
|||||||
element._latlngs.forEach(element => {
|
element._latlngs.forEach(element => {
|
||||||
if(element.__vertex && Number(element.glueindex) === Number(nIndex)){
|
if(element.__vertex && Number(element.glueindex) === Number(nIndex)){
|
||||||
if (this.$store.state.Editable.data.node.coords) {
|
if (this.$store.state.Editable.data.node.coords) {
|
||||||
|
console.log('Cords : ' + this.$store.state.Editable.data.node.coords);
|
||||||
|
|
||||||
this.setPointCoords(this.$store.state.Editable.index, this.$store.state.Editable.data.node.coords)
|
this.setPointCoords(this.$store.state.Editable.index, this.$store.state.Editable.data.node.coords)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@ L.RunwayNode = L.Marker.extend({
|
|||||||
function (state) {
|
function (state) {
|
||||||
return state.Editable.data.runway;
|
return state.Editable.data.runway;
|
||||||
},
|
},
|
||||||
() => {
|
(state) => {
|
||||||
// Reset colour
|
// Reset colour
|
||||||
if(event.target instanceof L.RunwayNode &&
|
if(event.target instanceof L.RunwayNode &&
|
||||||
event.target.options.attributes &&
|
event.target.options.attributes &&
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
|
const Vue = require('vue');
|
||||||
|
|
||||||
var L = require('leaflet');
|
var L = require('leaflet');
|
||||||
const store = require('../store');
|
const store = require('../store');
|
||||||
|
|
||||||
@ -53,12 +55,12 @@ exports.extendTaxiSegment = function (taxiwaySegment) {
|
|||||||
event.target.options.attributes.index = event.target._leaflet_id;
|
event.target.options.attributes.index = event.target._leaflet_id;
|
||||||
event.target.options.attributes.selected = true;
|
event.target.options.attributes.selected = true;
|
||||||
store.default.dispatch('setArc', event.target.options.attributes);
|
store.default.dispatch('setArc', event.target.options.attributes);
|
||||||
}
|
|
||||||
this.unwatch = store.default.watch(
|
this.unwatch = store.default.watch(
|
||||||
function (state) {
|
function (state) {
|
||||||
return state.Editable.data.arc;
|
return state.Editable.data.arc;
|
||||||
},
|
},
|
||||||
() => {
|
(arc) => {
|
||||||
|
console.debug(arc);
|
||||||
// Reset colour
|
// Reset colour
|
||||||
if (event.target instanceof L.Polyline &&
|
if (event.target instanceof L.Polyline &&
|
||||||
event.target.options.attributes &&
|
event.target.options.attributes &&
|
||||||
@ -73,6 +75,7 @@ exports.extendTaxiSegment = function (taxiwaySegment) {
|
|||||||
deep: true //add this if u need to watch object properties change etc.
|
deep: true //add this if u need to watch object properties change etc.
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
this.on('editable:drawing:move', function (event) {
|
this.on('editable:drawing:move', function (event) {
|
||||||
if (dragIndex >= 0) {
|
if (dragIndex >= 0) {
|
||||||
@ -88,6 +91,7 @@ exports.extendTaxiSegment = function (taxiwaySegment) {
|
|||||||
if (taxiwaySegment.options.attributes === undefined) {
|
if (taxiwaySegment.options.attributes === undefined) {
|
||||||
taxiwaySegment.options.attributes = { direction: 'bi-directional' };
|
taxiwaySegment.options.attributes = { direction: 'bi-directional' };
|
||||||
}
|
}
|
||||||
|
taxiwaySegment.updateStyle();
|
||||||
// Glue to another node
|
// Glue to another node
|
||||||
if (closest) {
|
if (closest) {
|
||||||
event.latlng['glueindex'] = Number(closest.glueindex);
|
event.latlng['glueindex'] = Number(closest.glueindex);
|
||||||
@ -116,13 +120,13 @@ exports.extendTaxiSegment = function (taxiwaySegment) {
|
|||||||
if (taxiwaySegment.options.attributes.begin === undefined) {
|
if (taxiwaySegment.options.attributes.begin === undefined) {
|
||||||
taxiwaySegment.options.attributes.begin = event.vertex.latlng['glueindex']
|
taxiwaySegment.options.attributes.begin = event.vertex.latlng['glueindex']
|
||||||
taxiwaySegment.begin = event.vertex.latlng.glueindex;
|
taxiwaySegment.begin = event.vertex.latlng.glueindex;
|
||||||
} /*else if (taxiwaySegment.options.attributes.end === undefined ||
|
} else if (taxiwaySegment.options.attributes.end === undefined ||
|
||||||
Number(taxiwaySegment.getLatLngs()[taxiwaySegment.getLatLngs().length-1].glueindex) !== taxiwaySegment.options.attributes.end ) {
|
(taxiwaySegment.getLatLngs()[taxiwaySegment.getLatLngs().length - 1].glueindex &&
|
||||||
|
Number(taxiwaySegment.getLatLngs()[taxiwaySegment.getLatLngs().length - 1].glueindex) !== taxiwaySegment.options.attributes.end)) {
|
||||||
taxiwaySegment.options.attributes.end = event.vertex.latlng['glueindex']
|
taxiwaySegment.options.attributes.end = event.vertex.latlng['glueindex']
|
||||||
taxiwaySegment.end = event.vertex.latlng.glueindex;
|
taxiwaySegment.end = Number(event.vertex.latlng.glueindex);
|
||||||
}*/
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
this.on('editable:vertex:deleted', event => {
|
this.on('editable:vertex:deleted', event => {
|
||||||
console.log('editable:vertex:deleted' + event)
|
console.log('editable:vertex:deleted' + event)
|
||||||
@ -209,7 +213,10 @@ exports.extendTaxiSegment = function (taxiwaySegment) {
|
|||||||
if (parking.length > 0) {
|
if (parking.length > 0) {
|
||||||
parking[0].selectParking();
|
parking[0].selectParking();
|
||||||
} else {
|
} else {
|
||||||
|
Vue.default.nextTick(function () {
|
||||||
store.default.dispatch('setNode', event.vertex.latlng)
|
store.default.dispatch('setNode', event.vertex.latlng)
|
||||||
|
})
|
||||||
|
//
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
@ -32,7 +32,9 @@ const mutations = {
|
|||||||
if (node === undefined) {
|
if (node === undefined) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if (!state.data || state.type !== 'node') {
|
||||||
Vue.set(state, 'data', {})
|
Vue.set(state, 'data', {})
|
||||||
|
}
|
||||||
Vue.set(state.data, 'node', node)
|
Vue.set(state.data, 'node', node)
|
||||||
Vue.set(state, 'index', node.index)
|
Vue.set(state, 'index', node.index)
|
||||||
Vue.set(state, 'type', 'node')
|
Vue.set(state, 'type', 'node')
|
||||||
@ -44,7 +46,12 @@ const mutations = {
|
|||||||
Vue.set(state, 'type', 'runway')
|
Vue.set(state, 'type', 'runway')
|
||||||
},
|
},
|
||||||
SET_EDIT_ARC (state, arc) {
|
SET_EDIT_ARC (state, arc) {
|
||||||
|
if (arc === undefined) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (!state.data || state.type !== 'arc') {
|
||||||
Vue.set(state, 'data', {})
|
Vue.set(state, 'data', {})
|
||||||
|
}
|
||||||
Vue.set(state.data, 'arc', arc)
|
Vue.set(state.data, 'arc', arc)
|
||||||
if (state.data.arc.name === undefined) {
|
if (state.data.arc.name === undefined) {
|
||||||
Vue.set(state.data.arc, 'name', '')
|
Vue.set(state.data.arc, 'name', '')
|
||||||
|
Loading…
Reference in New Issue
Block a user