comparison client/src/components/ImportStretches.vue @ 2140:55bedb39295a

feat: clicking on stretches activates according layer
author Thomas Junk <thomas.junk@intevation.de>
date Thu, 07 Feb 2019 10:30:44 +0100
parents 3138d60dd1a6
children a08e0f532304
comparison
equal deleted inserted replaced
2139:22bbd0d0500e 2140:55bedb39295a
261 * Thomas Junk <thomas.junk@intevation.de> 261 * Thomas Junk <thomas.junk@intevation.de>
262 */ 262 */
263 import { mapState, mapGetters } from "vuex"; 263 import { mapState, mapGetters } from "vuex";
264 import { displayError, displayInfo } from "@/lib/errors.js"; 264 import { displayError, displayInfo } from "@/lib/errors.js";
265 import { formatSurveyDate } from "@/lib/date.js"; 265 import { formatSurveyDate } from "@/lib/date.js";
266 import { LAYERS } from "@/store/map.js";
266 267
267 export default { 268 export default {
268 name: "importstretches", 269 name: "importstretches",
269 data() { 270 data() {
270 return { 271 return {
354 title: this.$gettext("Not implemented"), 355 title: this.$gettext("Not implemented"),
355 message: this.$gettext("Deleting " + this.stretches[index].id) 356 message: this.$gettext("Deleting " + this.stretches[index].id)
356 }); 357 });
357 }, 358 },
358 moveMapToStretch(index) { 359 moveMapToStretch(index) {
360 this.$store.commit("map/setLayerVisible", LAYERS.STRETCHES);
359 this.$store.commit("map/moveToExtent", { 361 this.$store.commit("map/moveToExtent", {
360 feature: this.stretches[index], 362 feature: this.stretches[index],
361 zoom: 17, 363 zoom: 17,
362 preventZoomOut: true 364 preventZoomOut: true
363 }); 365 });
404 startEdit() { 406 startEdit() {
405 this.clean(); 407 this.clean();
406 this.edit = true; 408 this.edit = true;
407 }, 409 },
408 togglePipette(t) { 410 togglePipette(t) {
411 this.$store.commit("map/setLayerVisible", LAYERS.DISTANCEMARKSAXIS);
409 if (t === "start") { 412 if (t === "start") {
410 this.pipetteStart = !this.pipetteStart; 413 this.pipetteStart = !this.pipetteStart;
411 this.pipetteEnd = false; 414 this.pipetteEnd = false;
412 } else { 415 } else {
413 this.pipetteEnd = !this.pipetteEnd; 416 this.pipetteEnd = !this.pipetteEnd;