Mercurial > gemma
changeset 1155:a297793e5868
fixed bug with toggling draw tools
author | Markus Kottlaender <markus@intevation.de> |
---|---|
date | Tue, 13 Nov 2018 13:30:03 +0100 |
parents | 0330a5a8480e |
children | 9bef99a4a15f |
files | client/src/drawtool/Drawtool.vue |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/client/src/drawtool/Drawtool.vue Tue Nov 13 12:31:41 2018 +0100 +++ b/client/src/drawtool/Drawtool.vue Tue Nov 13 13:30:03 2018 +0100 @@ -73,6 +73,7 @@ "map/drawMode", this.drawMode !== "LineString" ? "LineString" : null ); + console.log(this.drawMode); this.$store.commit("map/cutMode", null); if (this.drawMode) this.enableDrawTool(); }, @@ -119,7 +120,6 @@ .clear(); this.openLayersMap.removeInteraction(this.drawTool); this.$store.commit("map/drawTool", null); - this.$store.commit("map/drawMode", null); }, drawEnd(event) { if (this.drawMode === "Polygon") { @@ -169,7 +169,6 @@ .clear(); this.openLayersMap.removeInteraction(this.cutTool); this.$store.commit("map/cutTool", null); - this.$store.commit("map/cutMode", false); }, cutEnd(event) { const length = getLength(event.feature.getGeometry()); @@ -245,6 +244,8 @@ window.addEventListener('keydown', (e) => { // Escape if (e.keyCode === 27) { + this.$store.commit("map/drawMode", null); + this.$store.commit("map/cutMode", false); this.disableDrawTool(); this.disableCutTool(); }