Mercurial > gemma
annotate client/src/morphtool/Morphtool.vue @ 1146:74e180ad3d6b
fairway profile UI improvements
splitscreen button position at top of profile container
bottleneck name and survey date as headline in profile container
moved logout button to sidebar menu to avoid unnecessary overlapping
author | Markus Kottlaender <markus@intevation.de> |
---|---|
date | Tue, 13 Nov 2018 11:12:12 +0100 |
parents | 5f98d0c9d738 |
children | b23622905a3f |
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"> |
1111
f106aee673e7
selected bottleneck and surveys now handled by bottleneck store
Markus Kottlaender <markus@intevation.de>
parents:
1064
diff
changeset
|
3 <div v-if="selectedBottleneck && surveys && !selectedSurvey" class="ui-element card card-body shadow"> |
f106aee673e7
selected bottleneck and surveys now handled by bottleneck store
Markus Kottlaender <markus@intevation.de>
parents:
1064
diff
changeset
|
4 <div class="headline"> |
f106aee673e7
selected bottleneck and surveys now handled by bottleneck store
Markus Kottlaender <markus@intevation.de>
parents:
1064
diff
changeset
|
5 <h4>{{ selectedBottleneck }}</h4> |
f106aee673e7
selected bottleneck and surveys now handled by bottleneck store
Markus Kottlaender <markus@intevation.de>
parents:
1064
diff
changeset
|
6 <hr> |
f106aee673e7
selected bottleneck and surveys now handled by bottleneck store
Markus Kottlaender <markus@intevation.de>
parents:
1064
diff
changeset
|
7 <div |
1146
74e180ad3d6b
fairway profile UI improvements
Markus Kottlaender <markus@intevation.de>
parents:
1144
diff
changeset
|
8 @click="$store.dispatch('fairwayprofile/clearSelection');" |
1111
f106aee673e7
selected bottleneck and surveys now handled by bottleneck store
Markus Kottlaender <markus@intevation.de>
parents:
1064
diff
changeset
|
9 class="float-left ui-element d-flex morphtoolminus" |
f106aee673e7
selected bottleneck and surveys now handled by bottleneck store
Markus Kottlaender <markus@intevation.de>
parents:
1064
diff
changeset
|
10 > |
f106aee673e7
selected bottleneck and surveys now handled by bottleneck store
Markus Kottlaender <markus@intevation.de>
parents:
1064
diff
changeset
|
11 <i class="fa fa-close morphtoolsminus"></i> |
892
81b84ad962f8
morphtool streamlined
Thomas Junk <thomas.junk@intevation.de>
parents:
891
diff
changeset
|
12 </div> |
886
b1489669ba52
morphtool layout fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
836
diff
changeset
|
13 </div> |
1111
f106aee673e7
selected bottleneck and surveys now handled by bottleneck store
Markus Kottlaender <markus@intevation.de>
parents:
1064
diff
changeset
|
14 <ul class="list-group surveylist"> |
f106aee673e7
selected bottleneck and surveys now handled by bottleneck store
Markus Kottlaender <markus@intevation.de>
parents:
1064
diff
changeset
|
15 <li |
f106aee673e7
selected bottleneck and surveys now handled by bottleneck store
Markus Kottlaender <markus@intevation.de>
parents:
1064
diff
changeset
|
16 v-for="survey of surveys" |
f106aee673e7
selected bottleneck and surveys now handled by bottleneck store
Markus Kottlaender <markus@intevation.de>
parents:
1064
diff
changeset
|
17 :key="survey.data_info" |
f106aee673e7
selected bottleneck and surveys now handled by bottleneck store
Markus Kottlaender <markus@intevation.de>
parents:
1064
diff
changeset
|
18 class="list-group-item" |
f106aee673e7
selected bottleneck and surveys now handled by bottleneck store
Markus Kottlaender <markus@intevation.de>
parents:
1064
diff
changeset
|
19 @click.prevent="$store.commit('bottlenecks/setSelectedSurvey', survey)" |
f106aee673e7
selected bottleneck and surveys now handled by bottleneck store
Markus Kottlaender <markus@intevation.de>
parents:
1064
diff
changeset
|
20 > |
f106aee673e7
selected bottleneck and surveys now handled by bottleneck store
Markus Kottlaender <markus@intevation.de>
parents:
1064
diff
changeset
|
21 <a href="#" @click.prevent>{{ survey.date_info }}</a> |
f106aee673e7
selected bottleneck and surveys now handled by bottleneck store
Markus Kottlaender <markus@intevation.de>
parents:
1064
diff
changeset
|
22 </li> |
f106aee673e7
selected bottleneck and surveys now handled by bottleneck store
Markus Kottlaender <markus@intevation.de>
parents:
1064
diff
changeset
|
23 </ul> |
892
81b84ad962f8
morphtool streamlined
Thomas Junk <thomas.junk@intevation.de>
parents:
891
diff
changeset
|
24 </div> |
1146
74e180ad3d6b
fairway profile UI improvements
Markus Kottlaender <markus@intevation.de>
parents:
1144
diff
changeset
|
25 <div v-if="selectedSurvey && !showSplitscreen" class="ui-element shadow morphtool"> |
892
81b84ad962f8
morphtool streamlined
Thomas Junk <thomas.junk@intevation.de>
parents:
891
diff
changeset
|
26 <div class="d-flex flex-row justify-content-between"> |
1146
74e180ad3d6b
fairway profile UI improvements
Markus Kottlaender <markus@intevation.de>
parents:
1144
diff
changeset
|
27 <h6 class="my-auto px-2"> |
1111
f106aee673e7
selected bottleneck and surveys now handled by bottleneck store
Markus Kottlaender <markus@intevation.de>
parents:
1064
diff
changeset
|
28 {{ selectedBottleneck }} |
1146
74e180ad3d6b
fairway profile UI improvements
Markus Kottlaender <markus@intevation.de>
parents:
1144
diff
changeset
|
29 ({{ selectedSurvey.date_info }}) |
1027
04a9e78dcc5f
refac: remove morphstore. not necessary
Thomas Junk <thomas.junk@intevation.de>
parents:
1019
diff
changeset
|
30 </h6> |
1146
74e180ad3d6b
fairway profile UI improvements
Markus Kottlaender <markus@intevation.de>
parents:
1144
diff
changeset
|
31 <i class="fa fa-angle-up py-2 px-2 border-left" @click="$store.commit('application/showSplitscreen', true)" v-if="Object.keys(currentProfile).length"></i> |
74e180ad3d6b
fairway profile UI improvements
Markus Kottlaender <markus@intevation.de>
parents:
1144
diff
changeset
|
32 <i class="fa fa-close text-danger py-2 px-2 border-left" @click="$store.dispatch('fairwayprofile/clearSelection');"></i> |
886
b1489669ba52
morphtool layout fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
836
diff
changeset
|
33 </div> |
b1489669ba52
morphtool layout fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
836
diff
changeset
|
34 </div> |
826
90a601884ff2
client: improve survey selection for Morphtool
Bernhard Reiter <bernhard@intevation.de>
parents:
823
diff
changeset
|
35 </div> |
823
d7ae7338872d
client: add morphtool again
Bernhard Reiter <bernhard@intevation.de>
parents:
diff
changeset
|
36 </template> |
d7ae7338872d
client: add morphtool again
Bernhard Reiter <bernhard@intevation.de>
parents:
diff
changeset
|
37 |
892
81b84ad962f8
morphtool streamlined
Thomas Junk <thomas.junk@intevation.de>
parents:
891
diff
changeset
|
38 <style scoped lang="scss"> |
81b84ad962f8
morphtool streamlined
Thomas Junk <thomas.junk@intevation.de>
parents:
891
diff
changeset
|
39 .headline { |
81b84ad962f8
morphtool streamlined
Thomas Junk <thomas.junk@intevation.de>
parents:
891
diff
changeset
|
40 margin-right: $offset; |
886
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 } |
892
81b84ad962f8
morphtool streamlined
Thomas Junk <thomas.junk@intevation.de>
parents:
891
diff
changeset
|
43 .morphcontainer { |
81b84ad962f8
morphtool streamlined
Thomas Junk <thomas.junk@intevation.de>
parents:
891
diff
changeset
|
44 margin-bottom: $offset; |
81b84ad962f8
morphtool streamlined
Thomas Junk <thomas.junk@intevation.de>
parents:
891
diff
changeset
|
45 margin-left: auto; |
81b84ad962f8
morphtool streamlined
Thomas Junk <thomas.junk@intevation.de>
parents:
891
diff
changeset
|
46 border-radius: $border-radius; |
81b84ad962f8
morphtool streamlined
Thomas Junk <thomas.junk@intevation.de>
parents:
891
diff
changeset
|
47 } |
886
b1489669ba52
morphtool layout fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
836
diff
changeset
|
48 .surveylist { |
892
81b84ad962f8
morphtool streamlined
Thomas Junk <thomas.junk@intevation.de>
parents:
891
diff
changeset
|
49 text-align: left; |
886
b1489669ba52
morphtool layout fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
836
diff
changeset
|
50 margin-bottom: $offset !important; |
b1489669ba52
morphtool layout fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
836
diff
changeset
|
51 margin-left: $offset; |
b1489669ba52
morphtool layout fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
836
diff
changeset
|
52 margin-right: $offset; |
b1489669ba52
morphtool layout fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
836
diff
changeset
|
53 } |
892
81b84ad962f8
morphtool streamlined
Thomas Junk <thomas.junk@intevation.de>
parents:
891
diff
changeset
|
54 |
81b84ad962f8
morphtool streamlined
Thomas Junk <thomas.junk@intevation.de>
parents:
891
diff
changeset
|
55 .surveylist li { |
81b84ad962f8
morphtool streamlined
Thomas Junk <thomas.junk@intevation.de>
parents:
891
diff
changeset
|
56 margin-left: auto; |
81b84ad962f8
morphtool streamlined
Thomas Junk <thomas.junk@intevation.de>
parents:
891
diff
changeset
|
57 margin-right: auto; |
81b84ad962f8
morphtool streamlined
Thomas Junk <thomas.junk@intevation.de>
parents:
891
diff
changeset
|
58 border-style: none; |
81b84ad962f8
morphtool streamlined
Thomas Junk <thomas.junk@intevation.de>
parents:
891
diff
changeset
|
59 padding-bottom: 0rem; |
81b84ad962f8
morphtool streamlined
Thomas Junk <thomas.junk@intevation.de>
parents:
891
diff
changeset
|
60 } |
81b84ad962f8
morphtool streamlined
Thomas Junk <thomas.junk@intevation.de>
parents:
891
diff
changeset
|
61 |
823
d7ae7338872d
client: add morphtool again
Bernhard Reiter <bernhard@intevation.de>
parents:
diff
changeset
|
62 .morphtool { |
d7ae7338872d
client: add morphtool again
Bernhard Reiter <bernhard@intevation.de>
parents:
diff
changeset
|
63 position: relative; |
d7ae7338872d
client: add morphtool again
Bernhard Reiter <bernhard@intevation.de>
parents:
diff
changeset
|
64 background-color: white; |
d7ae7338872d
client: add morphtool again
Bernhard Reiter <bernhard@intevation.de>
parents:
diff
changeset
|
65 border-radius: $border-radius; |
d7ae7338872d
client: add morphtool again
Bernhard Reiter <bernhard@intevation.de>
parents:
diff
changeset
|
66 height: $icon-width; |
892
81b84ad962f8
morphtool streamlined
Thomas Junk <thomas.junk@intevation.de>
parents:
891
diff
changeset
|
67 margin-top: auto; |
81b84ad962f8
morphtool streamlined
Thomas Junk <thomas.junk@intevation.de>
parents:
891
diff
changeset
|
68 margin-bottom: auto; |
826
90a601884ff2
client: improve survey selection for Morphtool
Bernhard Reiter <bernhard@intevation.de>
parents:
823
diff
changeset
|
69 z-index: 2; |
90a601884ff2
client: improve survey selection for Morphtool
Bernhard Reiter <bernhard@intevation.de>
parents:
823
diff
changeset
|
70 } |
892
81b84ad962f8
morphtool streamlined
Thomas Junk <thomas.junk@intevation.de>
parents:
891
diff
changeset
|
71 |
826
90a601884ff2
client: improve survey selection for Morphtool
Bernhard Reiter <bernhard@intevation.de>
parents:
823
diff
changeset
|
72 .morphtoolminus { |
886
b1489669ba52
morphtool layout fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
836
diff
changeset
|
73 position: absolute; |
892
81b84ad962f8
morphtool streamlined
Thomas Junk <thomas.junk@intevation.de>
parents:
891
diff
changeset
|
74 top: 0; |
81b84ad962f8
morphtool streamlined
Thomas Junk <thomas.junk@intevation.de>
parents:
891
diff
changeset
|
75 right: 0; |
826
90a601884ff2
client: improve survey selection for Morphtool
Bernhard Reiter <bernhard@intevation.de>
parents:
823
diff
changeset
|
76 background-color: white; |
90a601884ff2
client: improve survey selection for Morphtool
Bernhard Reiter <bernhard@intevation.de>
parents:
823
diff
changeset
|
77 padding: $small-offset; |
90a601884ff2
client: improve survey selection for Morphtool
Bernhard Reiter <bernhard@intevation.de>
parents:
823
diff
changeset
|
78 border-radius: $border-radius; |
90a601884ff2
client: improve survey selection for Morphtool
Bernhard Reiter <bernhard@intevation.de>
parents:
823
diff
changeset
|
79 height: $icon-width; |
90a601884ff2
client: improve survey selection for Morphtool
Bernhard Reiter <bernhard@intevation.de>
parents:
823
diff
changeset
|
80 width: $icon-height; |
823
d7ae7338872d
client: add morphtool again
Bernhard Reiter <bernhard@intevation.de>
parents:
diff
changeset
|
81 z-index: 2; |
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 </style> |
d7ae7338872d
client: add morphtool again
Bernhard Reiter <bernhard@intevation.de>
parents:
diff
changeset
|
84 |
d7ae7338872d
client: add morphtool again
Bernhard Reiter <bernhard@intevation.de>
parents:
diff
changeset
|
85 <script> |
1019
ca628dce90dd
Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents:
1015
diff
changeset
|
86 /* |
ca628dce90dd
Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents:
1015
diff
changeset
|
87 * This is Free Software under GNU Affero General Public License v >= 3.0 |
ca628dce90dd
Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents:
1015
diff
changeset
|
88 * without warranty, see README.md and license for details. |
ca628dce90dd
Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents:
1015
diff
changeset
|
89 * |
ca628dce90dd
Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents:
1015
diff
changeset
|
90 * SPDX-License-Identifier: AGPL-3.0-or-later |
ca628dce90dd
Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents:
1015
diff
changeset
|
91 * License-Filename: LICENSES/AGPL-3.0.txt |
ca628dce90dd
Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents:
1015
diff
changeset
|
92 * |
ca628dce90dd
Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents:
1015
diff
changeset
|
93 * Copyright (C) 2018 by via donau |
ca628dce90dd
Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents:
1015
diff
changeset
|
94 * – Österreichische Wasserstraßen-Gesellschaft mbH |
ca628dce90dd
Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents:
1015
diff
changeset
|
95 * Software engineering by Intevation GmbH |
ca628dce90dd
Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents:
1015
diff
changeset
|
96 * |
ca628dce90dd
Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents:
1015
diff
changeset
|
97 * Author(s): |
ca628dce90dd
Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents:
1015
diff
changeset
|
98 * Thomas Junk <thomas.junk@intevation.de> |
ca628dce90dd
Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents:
1015
diff
changeset
|
99 */ |
1140
2e06bc53b002
separating line/polygon/cut tools in UI
Markus Kottlaender <markus@intevation.de>
parents:
1123
diff
changeset
|
100 import { mapState, mapGetters } from "vuex"; |
826
90a601884ff2
client: improve survey selection for Morphtool
Bernhard Reiter <bernhard@intevation.de>
parents:
823
diff
changeset
|
101 |
823
d7ae7338872d
client: add morphtool again
Bernhard Reiter <bernhard@intevation.de>
parents:
diff
changeset
|
102 export default { |
d7ae7338872d
client: add morphtool again
Bernhard Reiter <bernhard@intevation.de>
parents:
diff
changeset
|
103 name: "morphtool", |
d7ae7338872d
client: add morphtool again
Bernhard Reiter <bernhard@intevation.de>
parents:
diff
changeset
|
104 computed: { |
1140
2e06bc53b002
separating line/polygon/cut tools in UI
Markus Kottlaender <markus@intevation.de>
parents:
1123
diff
changeset
|
105 ...mapGetters("map", ["getLayerByName"]), |
2e06bc53b002
separating line/polygon/cut tools in UI
Markus Kottlaender <markus@intevation.de>
parents:
1123
diff
changeset
|
106 ...mapState("map", ["openLayersMap", "cutTool"]), |
1146
74e180ad3d6b
fairway profile UI improvements
Markus Kottlaender <markus@intevation.de>
parents:
1144
diff
changeset
|
107 ...mapState("application", ["showSplitscreen"]), |
74e180ad3d6b
fairway profile UI improvements
Markus Kottlaender <markus@intevation.de>
parents:
1144
diff
changeset
|
108 ...mapState("fairwayprofile", ["currentProfile"]), |
1118
7e788814cbde
removed unnecessary imports and formatted code
Markus Kottlaender <markus@intevation.de>
parents:
1115
diff
changeset
|
109 ...mapState("bottlenecks", [ |
7e788814cbde
removed unnecessary imports and formatted code
Markus Kottlaender <markus@intevation.de>
parents:
1115
diff
changeset
|
110 "selectedBottleneck", |
7e788814cbde
removed unnecessary imports and formatted code
Markus Kottlaender <markus@intevation.de>
parents:
1115
diff
changeset
|
111 "surveys", |
7e788814cbde
removed unnecessary imports and formatted code
Markus Kottlaender <markus@intevation.de>
parents:
1115
diff
changeset
|
112 "selectedSurvey" |
7e788814cbde
removed unnecessary imports and formatted code
Markus Kottlaender <markus@intevation.de>
parents:
1115
diff
changeset
|
113 ]) |
823
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 }; |
d7ae7338872d
client: add morphtool again
Bernhard Reiter <bernhard@intevation.de>
parents:
diff
changeset
|
116 </script> |