comparison client/src/components/toolbar/Toolbar.vue @ 3553:869505c5087b

client: fairway profile: close compare view with ESC key also added a notice at the top of the screen that indicates when ESC key can be used to either cancel drawing (line, polygon, crosscut) or to close the compare split view for two sounding results
author Markus Kottlaender <markus@intevation.de>
date Fri, 31 May 2019 14:32:24 +0200
parents dc91d2b71a58
children 8f421cd3c746
comparison
equal deleted inserted replaced
3552:ffc8fb059d1a 3553:869505c5087b
129 Gauges: () => import("./Gauges"), 129 Gauges: () => import("./Gauges"),
130 Pdftool: () => import("./Pdftool"), 130 Pdftool: () => import("./Pdftool"),
131 AvailableFairwayDepth: () => import("./AvailableFairwayDepth") 131 AvailableFairwayDepth: () => import("./AvailableFairwayDepth")
132 }, 132 },
133 computed: { 133 computed: {
134 ...mapState("map", ["openLayersMaps"]),
135 ...mapState("application", ["expandToolbar"]) 134 ...mapState("application", ["expandToolbar"])
136 },
137 mounted() {
138 window.addEventListener("keydown", e => {
139 // Escape
140 if (e.keyCode === 27) {
141 this.$store.commit("map/lineToolEnabled", false);
142 this.$store.commit("map/polygonToolEnabled", false);
143 this.$store.commit("map/cutToolEnabled", false);
144 this.$store.commit("map/setCurrentMeasurement", null);
145 this.openLayersMaps.forEach(m => {
146 m.getLayer("DRAWTOOL")
147 .getSource()
148 .clear();
149 });
150 }
151 });
152 } 135 }
153 }; 136 };
154 </script> 137 </script>