diff --git a/src/renderer/components/EditBar.vue b/src/renderer/components/EditBar.vue index 8f4b363..fbb7cf2 100644 --- a/src/renderer/components/EditBar.vue +++ b/src/renderer/components/EditBar.vue @@ -26,10 +26,12 @@ undo () { this.editing = false this.$parent.$parent.$refs.editLayer.disableEdit() + this.$parent.$parent.$refs.editLayer.reload() }, save () { this.editing = false this.$parent.$parent.$refs.editLayer.disableEdit() + this.$parent.$parent.$refs.editLayer.save() }, drawPolyline () { this.$parent.$parent.$refs.editLayer.drawPolyline() diff --git a/src/renderer/components/EditLayer.vue b/src/renderer/components/EditLayer.vue index 57aeeee..580dc14 100644 --- a/src/renderer/components/EditLayer.vue +++ b/src/renderer/components/EditLayer.vue @@ -26,7 +26,7 @@ }, data () { return { - maxId: 1 + maxId: 1, icao: String } }, methods: { @@ -38,6 +38,7 @@ console.log(this.groundnet.maxId) this.groundnet.addTo(this.$parent.mapObject) + this.icao = icao }, visible (feature) { let bounds = this.$store.state.Settings.bounds @@ -97,8 +98,12 @@ addFeature(circle) // console.log(this.groundnet) this.$parent.mapObject.off('click', this.addParking) + }, + reload () { + this.load(this.icao) + }, + save () { } - }, computed: { edit: function () {