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