annotate client/src/morphtool/Morphtool.vue @ 1015:d2f30a784fb3

feat: add selectfield to fairwayprofile
author Thomas Junk <thomas.junk@intevation.de>
date Tue, 23 Oct 2018 14:28:43 +0200
parents 9d4af4b1c5c8
children ca628dce90dd
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
823
d7ae7338872d client: add morphtool again
Bernhard Reiter <bernhard@intevation.de>
parents:
diff changeset
1 <template>
1011
9d4af4b1c5c8 refac: make template logic more clear
Thomas Junk <thomas.junk@intevation.de>
parents: 1002
diff changeset
2 <div class="morphcontainer">
9d4af4b1c5c8 refac: make template logic more clear
Thomas Junk <thomas.junk@intevation.de>
parents: 1002
diff changeset
3 <div v-if="selectedBottleneck">
9d4af4b1c5c8 refac: make template logic more clear
Thomas Junk <thomas.junk@intevation.de>
parents: 1002
diff changeset
4 <div v-if="surveyList && !drawMode" class="ui-element card card-body shadow">
9d4af4b1c5c8 refac: make template logic more clear
Thomas Junk <thomas.junk@intevation.de>
parents: 1002
diff changeset
5 <div class="headline">
9d4af4b1c5c8 refac: make template logic more clear
Thomas Junk <thomas.junk@intevation.de>
parents: 1002
diff changeset
6 <h4>{{bottleneckName}}</h4>
9d4af4b1c5c8 refac: make template logic more clear
Thomas Junk <thomas.junk@intevation.de>
parents: 1002
diff changeset
7 <hr>
9d4af4b1c5c8 refac: make template logic more clear
Thomas Junk <thomas.junk@intevation.de>
parents: 1002
diff changeset
8 <div @click="clearSelection" class="float-left ui-element d-flex morphtoolminus">
9d4af4b1c5c8 refac: make template logic more clear
Thomas Junk <thomas.junk@intevation.de>
parents: 1002
diff changeset
9 <i class="fa fa-close morphtoolsminus"></i>
9d4af4b1c5c8 refac: make template logic more clear
Thomas Junk <thomas.junk@intevation.de>
parents: 1002
diff changeset
10 </div>
892
81b84ad962f8 morphtool streamlined
Thomas Junk <thomas.junk@intevation.de>
parents: 891
diff changeset
11 </div>
1011
9d4af4b1c5c8 refac: make template logic more clear
Thomas Junk <thomas.junk@intevation.de>
parents: 1002
diff changeset
12 <ul class="list-group surveylist">
9d4af4b1c5c8 refac: make template logic more clear
Thomas Junk <thomas.junk@intevation.de>
parents: 1002
diff changeset
13 <li v-for="survey of surveyList.surveys" :key="survey.data_info" class="list-group-item" @click.prevent="selectSurvey(survey)">
9d4af4b1c5c8 refac: make template logic more clear
Thomas Junk <thomas.junk@intevation.de>
parents: 1002
diff changeset
14 <a href="#" @click.prevent="">{{survey.date_info}}</a>
9d4af4b1c5c8 refac: make template logic more clear
Thomas Junk <thomas.junk@intevation.de>
parents: 1002
diff changeset
15 </li>
9d4af4b1c5c8 refac: make template logic more clear
Thomas Junk <thomas.junk@intevation.de>
parents: 1002
diff changeset
16 </ul>
886
b1489669ba52 morphtool layout fixed
Thomas Junk <thomas.junk@intevation.de>
parents: 836
diff changeset
17 </div>
892
81b84ad962f8 morphtool streamlined
Thomas Junk <thomas.junk@intevation.de>
parents: 891
diff changeset
18 </div>
81b84ad962f8 morphtool streamlined
Thomas Junk <thomas.junk@intevation.de>
parents: 891
diff changeset
19 <div v-if="selectedMorph" @click="clearSelection" class="ui-element shadow morphtool">
81b84ad962f8 morphtool streamlined
Thomas Junk <thomas.junk@intevation.de>
parents: 891
diff changeset
20 <div class="d-flex flex-row justify-content-between">
894
1cd749dcb6a3 red cross
Thomas Junk <thomas.junk@intevation.de>
parents: 893
diff changeset
21 <i class="fa fa-close text-danger"></i>
893
5ea4c3f5d2a7 refinement of bottleneck selection
Thomas Junk <thomas.junk@intevation.de>
parents: 892
diff changeset
22 <small>Bottleneck:&nbsp;</small>
997
26ca04caa330 fix: Setting selected Bottleneck null caused Nullpointer Exception.
Thomas Junk <thomas.junk@intevation.de>
parents: 994
diff changeset
23 <h6>{{bottleneckName}} <small>( {{selectedMorph.date_info}} )</small></h6>
886
b1489669ba52 morphtool layout fixed
Thomas Junk <thomas.junk@intevation.de>
parents: 836
diff changeset
24 </div>
b1489669ba52 morphtool layout fixed
Thomas Junk <thomas.junk@intevation.de>
parents: 836
diff changeset
25 </div>
826
90a601884ff2 client: improve survey selection for Morphtool
Bernhard Reiter <bernhard@intevation.de>
parents: 823
diff changeset
26 </div>
823
d7ae7338872d client: add morphtool again
Bernhard Reiter <bernhard@intevation.de>
parents:
diff changeset
27 </template>
d7ae7338872d client: add morphtool again
Bernhard Reiter <bernhard@intevation.de>
parents:
diff changeset
28
892
81b84ad962f8 morphtool streamlined
Thomas Junk <thomas.junk@intevation.de>
parents: 891
diff changeset
29 <style scoped lang="scss">
81b84ad962f8 morphtool streamlined
Thomas Junk <thomas.junk@intevation.de>
parents: 891
diff changeset
30 .headline {
81b84ad962f8 morphtool streamlined
Thomas Junk <thomas.junk@intevation.de>
parents: 891
diff changeset
31 margin-right: $offset;
886
b1489669ba52 morphtool layout fixed
Thomas Junk <thomas.junk@intevation.de>
parents: 836
diff changeset
32 margin-left: $offset;
b1489669ba52 morphtool layout fixed
Thomas Junk <thomas.junk@intevation.de>
parents: 836
diff changeset
33 }
892
81b84ad962f8 morphtool streamlined
Thomas Junk <thomas.junk@intevation.de>
parents: 891
diff changeset
34 .morphcontainer {
81b84ad962f8 morphtool streamlined
Thomas Junk <thomas.junk@intevation.de>
parents: 891
diff changeset
35 margin-bottom: $offset;
81b84ad962f8 morphtool streamlined
Thomas Junk <thomas.junk@intevation.de>
parents: 891
diff changeset
36 margin-left: auto;
899
038ba806f323 fix: typo
Thomas Junk <thomas.junk@intevation.de>
parents: 894
diff changeset
37 margin-right: $large-offset + $icon-width;
892
81b84ad962f8 morphtool streamlined
Thomas Junk <thomas.junk@intevation.de>
parents: 891
diff changeset
38 border-radius: $border-radius;
81b84ad962f8 morphtool streamlined
Thomas Junk <thomas.junk@intevation.de>
parents: 891
diff changeset
39 }
886
b1489669ba52 morphtool layout fixed
Thomas Junk <thomas.junk@intevation.de>
parents: 836
diff changeset
40 .surveylist {
892
81b84ad962f8 morphtool streamlined
Thomas Junk <thomas.junk@intevation.de>
parents: 891
diff changeset
41 text-align: left;
886
b1489669ba52 morphtool layout fixed
Thomas Junk <thomas.junk@intevation.de>
parents: 836
diff changeset
42 margin-bottom: $offset !important;
b1489669ba52 morphtool layout fixed
Thomas Junk <thomas.junk@intevation.de>
parents: 836
diff changeset
43 margin-left: $offset;
b1489669ba52 morphtool layout fixed
Thomas Junk <thomas.junk@intevation.de>
parents: 836
diff changeset
44 margin-right: $offset;
b1489669ba52 morphtool layout fixed
Thomas Junk <thomas.junk@intevation.de>
parents: 836
diff changeset
45 }
892
81b84ad962f8 morphtool streamlined
Thomas Junk <thomas.junk@intevation.de>
parents: 891
diff changeset
46
81b84ad962f8 morphtool streamlined
Thomas Junk <thomas.junk@intevation.de>
parents: 891
diff changeset
47 .surveylist li {
81b84ad962f8 morphtool streamlined
Thomas Junk <thomas.junk@intevation.de>
parents: 891
diff changeset
48 margin-left: auto;
81b84ad962f8 morphtool streamlined
Thomas Junk <thomas.junk@intevation.de>
parents: 891
diff changeset
49 margin-right: auto;
81b84ad962f8 morphtool streamlined
Thomas Junk <thomas.junk@intevation.de>
parents: 891
diff changeset
50 border-style: none;
81b84ad962f8 morphtool streamlined
Thomas Junk <thomas.junk@intevation.de>
parents: 891
diff changeset
51 padding-bottom: 0rem;
81b84ad962f8 morphtool streamlined
Thomas Junk <thomas.junk@intevation.de>
parents: 891
diff changeset
52 }
81b84ad962f8 morphtool streamlined
Thomas Junk <thomas.junk@intevation.de>
parents: 891
diff changeset
53
823
d7ae7338872d client: add morphtool again
Bernhard Reiter <bernhard@intevation.de>
parents:
diff changeset
54 .morphtool {
d7ae7338872d client: add morphtool again
Bernhard Reiter <bernhard@intevation.de>
parents:
diff changeset
55 position: relative;
d7ae7338872d client: add morphtool again
Bernhard Reiter <bernhard@intevation.de>
parents:
diff changeset
56 background-color: white;
d7ae7338872d client: add morphtool again
Bernhard Reiter <bernhard@intevation.de>
parents:
diff changeset
57 padding: $small-offset;
d7ae7338872d client: add morphtool again
Bernhard Reiter <bernhard@intevation.de>
parents:
diff changeset
58 border-radius: $border-radius;
d7ae7338872d client: add morphtool again
Bernhard Reiter <bernhard@intevation.de>
parents:
diff changeset
59 height: $icon-width;
826
90a601884ff2 client: improve survey selection for Morphtool
Bernhard Reiter <bernhard@intevation.de>
parents: 823
diff changeset
60 margin-right: $offset;
892
81b84ad962f8 morphtool streamlined
Thomas Junk <thomas.junk@intevation.de>
parents: 891
diff changeset
61 margin-top: auto;
81b84ad962f8 morphtool streamlined
Thomas Junk <thomas.junk@intevation.de>
parents: 891
diff changeset
62 margin-bottom: auto;
826
90a601884ff2 client: improve survey selection for Morphtool
Bernhard Reiter <bernhard@intevation.de>
parents: 823
diff changeset
63 z-index: 2;
90a601884ff2 client: improve survey selection for Morphtool
Bernhard Reiter <bernhard@intevation.de>
parents: 823
diff changeset
64 }
892
81b84ad962f8 morphtool streamlined
Thomas Junk <thomas.junk@intevation.de>
parents: 891
diff changeset
65
81b84ad962f8 morphtool streamlined
Thomas Junk <thomas.junk@intevation.de>
parents: 891
diff changeset
66 .morphcontainer i {
81b84ad962f8 morphtool streamlined
Thomas Junk <thomas.junk@intevation.de>
parents: 891
diff changeset
67 margin-right: $small-offset;
81b84ad962f8 morphtool streamlined
Thomas Junk <thomas.junk@intevation.de>
parents: 891
diff changeset
68 }
81b84ad962f8 morphtool streamlined
Thomas Junk <thomas.junk@intevation.de>
parents: 891
diff changeset
69
826
90a601884ff2 client: improve survey selection for Morphtool
Bernhard Reiter <bernhard@intevation.de>
parents: 823
diff changeset
70 .morphtoolminus {
886
b1489669ba52 morphtool layout fixed
Thomas Junk <thomas.junk@intevation.de>
parents: 836
diff changeset
71 position: absolute;
892
81b84ad962f8 morphtool streamlined
Thomas Junk <thomas.junk@intevation.de>
parents: 891
diff changeset
72 top: 0;
81b84ad962f8 morphtool streamlined
Thomas Junk <thomas.junk@intevation.de>
parents: 891
diff changeset
73 right: 0;
826
90a601884ff2 client: improve survey selection for Morphtool
Bernhard Reiter <bernhard@intevation.de>
parents: 823
diff changeset
74 background-color: white;
90a601884ff2 client: improve survey selection for Morphtool
Bernhard Reiter <bernhard@intevation.de>
parents: 823
diff changeset
75 padding: $small-offset;
90a601884ff2 client: improve survey selection for Morphtool
Bernhard Reiter <bernhard@intevation.de>
parents: 823
diff changeset
76 border-radius: $border-radius;
90a601884ff2 client: improve survey selection for Morphtool
Bernhard Reiter <bernhard@intevation.de>
parents: 823
diff changeset
77 height: $icon-width;
90a601884ff2 client: improve survey selection for Morphtool
Bernhard Reiter <bernhard@intevation.de>
parents: 823
diff changeset
78 width: $icon-height;
823
d7ae7338872d client: add morphtool again
Bernhard Reiter <bernhard@intevation.de>
parents:
diff changeset
79 z-index: 2;
d7ae7338872d client: add morphtool again
Bernhard Reiter <bernhard@intevation.de>
parents:
diff changeset
80 }
d7ae7338872d client: add morphtool again
Bernhard Reiter <bernhard@intevation.de>
parents:
diff changeset
81 </style>
d7ae7338872d client: add morphtool again
Bernhard Reiter <bernhard@intevation.de>
parents:
diff changeset
82
d7ae7338872d client: add morphtool again
Bernhard Reiter <bernhard@intevation.de>
parents:
diff changeset
83 <script>
d7ae7338872d client: add morphtool again
Bernhard Reiter <bernhard@intevation.de>
parents:
diff changeset
84 import { mapGetters, mapState } from "vuex";
d7ae7338872d client: add morphtool again
Bernhard Reiter <bernhard@intevation.de>
parents:
diff changeset
85
826
90a601884ff2 client: improve survey selection for Morphtool
Bernhard Reiter <bernhard@intevation.de>
parents: 823
diff changeset
86 import { displayError } from "../application/lib/errors.js";
90a601884ff2 client: improve survey selection for Morphtool
Bernhard Reiter <bernhard@intevation.de>
parents: 823
diff changeset
87 import { HTTP } from "../application/lib/http";
90a601884ff2 client: improve survey selection for Morphtool
Bernhard Reiter <bernhard@intevation.de>
parents: 823
diff changeset
88
823
d7ae7338872d client: add morphtool again
Bernhard Reiter <bernhard@intevation.de>
parents:
diff changeset
89 export default {
d7ae7338872d client: add morphtool again
Bernhard Reiter <bernhard@intevation.de>
parents:
diff changeset
90 name: "morphtool",
d7ae7338872d client: add morphtool again
Bernhard Reiter <bernhard@intevation.de>
parents:
diff changeset
91 data() {
d7ae7338872d client: add morphtool again
Bernhard Reiter <bernhard@intevation.de>
parents:
diff changeset
92 return {
997
26ca04caa330 fix: Setting selected Bottleneck null caused Nullpointer Exception.
Thomas Junk <thomas.junk@intevation.de>
parents: 994
diff changeset
93 surveyList: null,
26ca04caa330 fix: Setting selected Bottleneck null caused Nullpointer Exception.
Thomas Junk <thomas.junk@intevation.de>
parents: 994
diff changeset
94 bottleneckName: ""
823
d7ae7338872d client: add morphtool again
Bernhard Reiter <bernhard@intevation.de>
parents:
diff changeset
95 };
d7ae7338872d client: add morphtool again
Bernhard Reiter <bernhard@intevation.de>
parents:
diff changeset
96 },
d7ae7338872d client: add morphtool again
Bernhard Reiter <bernhard@intevation.de>
parents:
diff changeset
97 computed: {
d7ae7338872d client: add morphtool again
Bernhard Reiter <bernhard@intevation.de>
parents:
diff changeset
98 ...mapGetters("application", ["drawMode"]),
975
3da707172772 refac: removed technical debt
Thomas Junk <thomas.junk@intevation.de>
parents: 962
diff changeset
99 ...mapState("identifystore", ["identifiedFeatures"]),
3da707172772 refac: removed technical debt
Thomas Junk <thomas.junk@intevation.de>
parents: 962
diff changeset
100 ...mapState("morphstore", ["selectedMorph"]),
823
d7ae7338872d client: add morphtool again
Bernhard Reiter <bernhard@intevation.de>
parents:
diff changeset
101 selectedBottleneck: function() {
1002
99d27dc9db5e fix: Morphtool works again
Thomas Junk <thomas.junk@intevation.de>
parents: 997
diff changeset
102 if (this.identifiedFeatures && !this.drawMode) {
823
d7ae7338872d client: add morphtool again
Bernhard Reiter <bernhard@intevation.de>
parents:
diff changeset
103 for (let feature of this.identifiedFeatures) {
836
0b994949a4a0 client: make Morphtool selection more robust
Bernhard Reiter <bernhard@intevation.de>
parents: 829
diff changeset
104 let id = feature.getId();
941
8a80ef09a62c client: improve identify
Bernhard Reiter <bernhard@intevation.de>
parents: 936
diff changeset
105 // RegExp.prototype.test() works with number, str and undefined
8a80ef09a62c client: improve identify
Bernhard Reiter <bernhard@intevation.de>
parents: 936
diff changeset
106 if (/^bottlenecks\./.test(id)) {
975
3da707172772 refac: removed technical debt
Thomas Junk <thomas.junk@intevation.de>
parents: 962
diff changeset
107 this.$store.commit("morphstore/setSelectedMorph", null);
823
d7ae7338872d client: add morphtool again
Bernhard Reiter <bernhard@intevation.de>
parents:
diff changeset
108 return feature;
d7ae7338872d client: add morphtool again
Bernhard Reiter <bernhard@intevation.de>
parents:
diff changeset
109 }
d7ae7338872d client: add morphtool again
Bernhard Reiter <bernhard@intevation.de>
parents:
diff changeset
110 }
d7ae7338872d client: add morphtool again
Bernhard Reiter <bernhard@intevation.de>
parents:
diff changeset
111 }
d7ae7338872d client: add morphtool again
Bernhard Reiter <bernhard@intevation.de>
parents:
diff changeset
112 return null;
d7ae7338872d client: add morphtool again
Bernhard Reiter <bernhard@intevation.de>
parents:
diff changeset
113 }
d7ae7338872d client: add morphtool again
Bernhard Reiter <bernhard@intevation.de>
parents:
diff changeset
114 },
d7ae7338872d client: add morphtool again
Bernhard Reiter <bernhard@intevation.de>
parents:
diff changeset
115 watch: {
826
90a601884ff2 client: improve survey selection for Morphtool
Bernhard Reiter <bernhard@intevation.de>
parents: 823
diff changeset
116 selectedBottleneck: function(bottleneckFeature) {
90a601884ff2 client: improve survey selection for Morphtool
Bernhard Reiter <bernhard@intevation.de>
parents: 823
diff changeset
117 if (bottleneckFeature) {
90a601884ff2 client: improve survey selection for Morphtool
Bernhard Reiter <bernhard@intevation.de>
parents: 823
diff changeset
118 let bottleneckName = bottleneckFeature.get("objnam");
90a601884ff2 client: improve survey selection for Morphtool
Bernhard Reiter <bernhard@intevation.de>
parents: 823
diff changeset
119 if (bottleneckName) {
997
26ca04caa330 fix: Setting selected Bottleneck null caused Nullpointer Exception.
Thomas Junk <thomas.junk@intevation.de>
parents: 994
diff changeset
120 this.bottleneckName = bottleneckName;
826
90a601884ff2 client: improve survey selection for Morphtool
Bernhard Reiter <bernhard@intevation.de>
parents: 823
diff changeset
121 this.queryBottleneck(bottleneckName);
90a601884ff2 client: improve survey selection for Morphtool
Bernhard Reiter <bernhard@intevation.de>
parents: 823
diff changeset
122 }
90a601884ff2 client: improve survey selection for Morphtool
Bernhard Reiter <bernhard@intevation.de>
parents: 823
diff changeset
123 }
823
d7ae7338872d client: add morphtool again
Bernhard Reiter <bernhard@intevation.de>
parents:
diff changeset
124 }
d7ae7338872d client: add morphtool again
Bernhard Reiter <bernhard@intevation.de>
parents:
diff changeset
125 },
d7ae7338872d client: add morphtool again
Bernhard Reiter <bernhard@intevation.de>
parents:
diff changeset
126 methods: {
826
90a601884ff2 client: improve survey selection for Morphtool
Bernhard Reiter <bernhard@intevation.de>
parents: 823
diff changeset
127 queryBottleneck(name) {
836
0b994949a4a0 client: make Morphtool selection more robust
Bernhard Reiter <bernhard@intevation.de>
parents: 829
diff changeset
128 // DEBUG console.log("starting to query bottleneck", name);
826
90a601884ff2 client: improve survey selection for Morphtool
Bernhard Reiter <bernhard@intevation.de>
parents: 823
diff changeset
129 HTTP.get("/surveys/" + name, {
90a601884ff2 client: improve survey selection for Morphtool
Bernhard Reiter <bernhard@intevation.de>
parents: 823
diff changeset
130 headers: {
90a601884ff2 client: improve survey selection for Morphtool
Bernhard Reiter <bernhard@intevation.de>
parents: 823
diff changeset
131 "X-Gemma-Auth": localStorage.getItem("token"),
90a601884ff2 client: improve survey selection for Morphtool
Bernhard Reiter <bernhard@intevation.de>
parents: 823
diff changeset
132 "Content-type": "text/xml; charset=UTF-8"
90a601884ff2 client: improve survey selection for Morphtool
Bernhard Reiter <bernhard@intevation.de>
parents: 823
diff changeset
133 }
90a601884ff2 client: improve survey selection for Morphtool
Bernhard Reiter <bernhard@intevation.de>
parents: 823
diff changeset
134 })
90a601884ff2 client: improve survey selection for Morphtool
Bernhard Reiter <bernhard@intevation.de>
parents: 823
diff changeset
135 .then(response => {
90a601884ff2 client: improve survey selection for Morphtool
Bernhard Reiter <bernhard@intevation.de>
parents: 823
diff changeset
136 this.surveyList = response.data;
1015
d2f30a784fb3 feat: add selectfield to fairwayprofile
Thomas Junk <thomas.junk@intevation.de>
parents: 1011
diff changeset
137 this.$store.commit(
d2f30a784fb3 feat: add selectfield to fairwayprofile
Thomas Junk <thomas.junk@intevation.de>
parents: 1011
diff changeset
138 "fairwayprofile/setAvailableSurveys",
d2f30a784fb3 feat: add selectfield to fairwayprofile
Thomas Junk <thomas.junk@intevation.de>
parents: 1011
diff changeset
139 response.data
d2f30a784fb3 feat: add selectfield to fairwayprofile
Thomas Junk <thomas.junk@intevation.de>
parents: 1011
diff changeset
140 );
826
90a601884ff2 client: improve survey selection for Morphtool
Bernhard Reiter <bernhard@intevation.de>
parents: 823
diff changeset
141 })
90a601884ff2 client: improve survey selection for Morphtool
Bernhard Reiter <bernhard@intevation.de>
parents: 823
diff changeset
142 .catch(error => {
90a601884ff2 client: improve survey selection for Morphtool
Bernhard Reiter <bernhard@intevation.de>
parents: 823
diff changeset
143 this.surveyList = null;
90a601884ff2 client: improve survey selection for Morphtool
Bernhard Reiter <bernhard@intevation.de>
parents: 823
diff changeset
144 const { status, data } = error.response;
90a601884ff2 client: improve survey selection for Morphtool
Bernhard Reiter <bernhard@intevation.de>
parents: 823
diff changeset
145 displayError({
90a601884ff2 client: improve survey selection for Morphtool
Bernhard Reiter <bernhard@intevation.de>
parents: 823
diff changeset
146 title: "Backend Error",
90a601884ff2 client: improve survey selection for Morphtool
Bernhard Reiter <bernhard@intevation.de>
parents: 823
diff changeset
147 message: `${status}: ${data.message || data}`
90a601884ff2 client: improve survey selection for Morphtool
Bernhard Reiter <bernhard@intevation.de>
parents: 823
diff changeset
148 });
90a601884ff2 client: improve survey selection for Morphtool
Bernhard Reiter <bernhard@intevation.de>
parents: 823
diff changeset
149 });
90a601884ff2 client: improve survey selection for Morphtool
Bernhard Reiter <bernhard@intevation.de>
parents: 823
diff changeset
150 },
90a601884ff2 client: improve survey selection for Morphtool
Bernhard Reiter <bernhard@intevation.de>
parents: 823
diff changeset
151 selectSurvey(survey) {
975
3da707172772 refac: removed technical debt
Thomas Junk <thomas.junk@intevation.de>
parents: 962
diff changeset
152 this.$store.commit("morphstore/setSelectedMorph", survey);
826
90a601884ff2 client: improve survey selection for Morphtool
Bernhard Reiter <bernhard@intevation.de>
parents: 823
diff changeset
153 this.surveyList = null;
90a601884ff2 client: improve survey selection for Morphtool
Bernhard Reiter <bernhard@intevation.de>
parents: 823
diff changeset
154 },
823
d7ae7338872d client: add morphtool again
Bernhard Reiter <bernhard@intevation.de>
parents:
diff changeset
155 clearSelection() {
975
3da707172772 refac: removed technical debt
Thomas Junk <thomas.junk@intevation.de>
parents: 962
diff changeset
156 this.$store.commit("identifystore/setIdentifiedFeatures", []);
3da707172772 refac: removed technical debt
Thomas Junk <thomas.junk@intevation.de>
parents: 962
diff changeset
157 this.$store.commit("morphstore/setSelectedMorph", null);
826
90a601884ff2 client: improve survey selection for Morphtool
Bernhard Reiter <bernhard@intevation.de>
parents: 823
diff changeset
158 this.surveyList = null;
936
f27fe4e9bfd9 client: improve morphology mode
Bernhard Reiter <bernhard@intevation.de>
parents: 910
diff changeset
159 if (this.drawMode) {
f27fe4e9bfd9 client: improve morphology mode
Bernhard Reiter <bernhard@intevation.de>
parents: 910
diff changeset
160 this.$store.commit("application/toggleDrawModeLine");
f27fe4e9bfd9 client: improve morphology mode
Bernhard Reiter <bernhard@intevation.de>
parents: 910
diff changeset
161 }
823
d7ae7338872d client: add morphtool again
Bernhard Reiter <bernhard@intevation.de>
parents:
diff changeset
162 }
d7ae7338872d client: add morphtool again
Bernhard Reiter <bernhard@intevation.de>
parents:
diff changeset
163 }
d7ae7338872d client: add morphtool again
Bernhard Reiter <bernhard@intevation.de>
parents:
diff changeset
164 };
d7ae7338872d client: add morphtool again
Bernhard Reiter <bernhard@intevation.de>
parents:
diff changeset
165 </script>