From 0e7e8f2785c871a7c7bba3d1fd22163cfaac4508 Mon Sep 17 00:00:00 2001 From: portree_kid Date: Wed, 8 Jan 2020 22:58:00 +0100 Subject: [PATCH] Undo/Reload --- src/renderer/components/EditBar.vue | 2 ++ src/renderer/components/EditLayer.vue | 9 +++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) 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 () {