Mercurial > gemma
diff client/src/components/ImportStretches.vue @ 2910:c8c7122047a2
client: stretches: select/unselect stretches by clicking on them on the map
author | Markus Kottlaender <markus@intevation.de> |
---|---|
date | Tue, 02 Apr 2019 18:59:26 +0200 |
parents | 5105f6ad0176 |
children | 6c5364ff0abb |
line wrap: on
line diff
--- a/client/src/components/ImportStretches.vue Tue Apr 02 18:19:43 2019 +0200 +++ b/client/src/components/ImportStretches.vue Tue Apr 02 18:59:26 2019 +0200 @@ -342,7 +342,7 @@ ...mapState("map", ["identifiedFeatures", "currentMeasurement"]), ...mapGetters("map", ["getVSourceByName", "getLayerByName"]), ...mapGetters("user", ["isSysAdmin"]), - ...mapState("imports", ["stretches", "selectedStretch"]), + ...mapState("imports", ["stretches"]), defineStretchesLabel() { return this.$gettext("Define Stretches"); }, @@ -380,16 +380,6 @@ this.pipetteStart = false; this.pipetteEnd = false; } - }, - selectedStretch(stretch) { - this.getVSourceByName(LAYERS.STRETCHES) - .getFeatures() - .forEach(f => { - f.set("highlighted", false); - if (f.getId() === stretch.id) { - f.set("highlighted", true); - } - }); } }, methods: { @@ -469,7 +459,7 @@ }); }, moveMapToStretch(stretch) { - this.$store.commit("imports/selectedStretch", stretch); + this.$store.commit("imports/selectedStretchId", stretch.id); this.$store.commit("map/setLayerVisible", LAYERS.STRETCHES); this.$store.commit("map/moveToExtent", { feature: stretch,