From f3703d1ef8edc1e23b1ec7e8d34b84088bfdbdb7 Mon Sep 17 00:00:00 2001 From: portree_kid Date: Thu, 21 May 2020 18:16:03 +0200 Subject: [PATCH] Open Sidebar --- src/renderer/components/LeafletSidebar.vue | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/src/renderer/components/LeafletSidebar.vue b/src/renderer/components/LeafletSidebar.vue index b306354..b4fb142 100644 --- a/src/renderer/components/LeafletSidebar.vue +++ b/src/renderer/components/LeafletSidebar.vue @@ -6,8 +6,8 @@
  • -
  • +
  • @@ -88,11 +88,27 @@ deferredMountedTo (parent) { this.sidebar = L.control.sidebar({ autopan: false, // whether to maintain the centered map point when opening the sidebar - closeButton: true, // whether t add a close button to the panes + closeButton: true, // whether to add a close button to the panes container: 'sidebar', // the DOM container or #ID of a predefined sidebar container that should be used position: 'left' // left or right }) parent.addControl(this.sidebar) + this.$store.subscribe((mutation, state) => { + switch (mutation.type) { + case 'SET_EDIT_AIRPORT': + case 'SET_EDIT_PARKING': + case 'SET_EDIT_NODE': + case 'SET_EDIT_RUNWAY': + case 'SET_EDIT_ARC': + this.sidebar.open('edit') + break + case 'CHECK_RESULTS': + this.sidebar.open('check') + break + default: + break + } + }) }, remove () { if (this.sidebar) {