annotate client/src/layers/Layers.vue @ 1251:d1903250390b

splitted mophtool into two components one shows the survey results and the other the info bar when a bottleneck is selected (and no profile is shown)
author Markus Kottlaender <markus@intevation.de>
date Wed, 21 Nov 2018 12:10:12 +0100
parents 104d41ea7c15
children da51fd6a72a0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
585
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1 <template>
1249
104d41ea7c15 restyling of boxes to save screen space
Markus Kottlaender <markus@intevation.de>
parents: 1247
diff changeset
2 <div :class="['box ui-element rounded bg-white mb-auto text-nowrap', { expanded: showLayers }]">
104d41ea7c15 restyling of boxes to save screen space
Markus Kottlaender <markus@intevation.de>
parents: 1247
diff changeset
3 <div style="width: 16rem">
104d41ea7c15 restyling of boxes to save screen space
Markus Kottlaender <markus@intevation.de>
parents: 1247
diff changeset
4 <h5 class="mb-0 py-2 border-bottom">
104d41ea7c15 restyling of boxes to save screen space
Markus Kottlaender <markus@intevation.de>
parents: 1247
diff changeset
5 <i class="fa fa-th-list"></i>
104d41ea7c15 restyling of boxes to save screen space
Markus Kottlaender <markus@intevation.de>
parents: 1247
diff changeset
6 Layers
104d41ea7c15 restyling of boxes to save screen space
Markus Kottlaender <markus@intevation.de>
parents: 1247
diff changeset
7 </h5>
104d41ea7c15 restyling of boxes to save screen space
Markus Kottlaender <markus@intevation.de>
parents: 1247
diff changeset
8 <div class="d-flex flex-column p-3 small">
104d41ea7c15 restyling of boxes to save screen space
Markus Kottlaender <markus@intevation.de>
parents: 1247
diff changeset
9 <Layerselect
104d41ea7c15 restyling of boxes to save screen space
Markus Kottlaender <markus@intevation.de>
parents: 1247
diff changeset
10 v-for="(layer, index) in layersForLegend"
104d41ea7c15 restyling of boxes to save screen space
Markus Kottlaender <markus@intevation.de>
parents: 1247
diff changeset
11 :layerindex="index"
104d41ea7c15 restyling of boxes to save screen space
Markus Kottlaender <markus@intevation.de>
parents: 1247
diff changeset
12 :layername="layer.name"
104d41ea7c15 restyling of boxes to save screen space
Markus Kottlaender <markus@intevation.de>
parents: 1247
diff changeset
13 :key="layer.name"
104d41ea7c15 restyling of boxes to save screen space
Markus Kottlaender <markus@intevation.de>
parents: 1247
diff changeset
14 :isVisible="layer.isVisible"
104d41ea7c15 restyling of boxes to save screen space
Markus Kottlaender <markus@intevation.de>
parents: 1247
diff changeset
15 @visibilityToggled="visibilityToggled"
104d41ea7c15 restyling of boxes to save screen space
Markus Kottlaender <markus@intevation.de>
parents: 1247
diff changeset
16 ></Layerselect>
626
d4fa28bfa6ec fix: layout minor fixes of buttons and menu
Thomas Junk <thomas.junk@intevation.de>
parents: 585
diff changeset
17 </div>
d4fa28bfa6ec fix: layout minor fixes of buttons and menu
Thomas Junk <thomas.junk@intevation.de>
parents: 585
diff changeset
18 </div>
585
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
19 </div>
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
20 </template>
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
21
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
22 <script>
1019
ca628dce90dd Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents: 957
diff changeset
23 /*
ca628dce90dd Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents: 957
diff changeset
24 * This is Free Software under GNU Affero General Public License v >= 3.0
ca628dce90dd Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents: 957
diff changeset
25 * without warranty, see README.md and license for details.
ca628dce90dd Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents: 957
diff changeset
26 *
ca628dce90dd Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents: 957
diff changeset
27 * SPDX-License-Identifier: AGPL-3.0-or-later
ca628dce90dd Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents: 957
diff changeset
28 * License-Filename: LICENSES/AGPL-3.0.txt
ca628dce90dd Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents: 957
diff changeset
29 *
ca628dce90dd Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents: 957
diff changeset
30 * Copyright (C) 2018 by via donau
ca628dce90dd Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents: 957
diff changeset
31 * – Österreichische Wasserstraßen-Gesellschaft mbH
ca628dce90dd Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents: 957
diff changeset
32 * Software engineering by Intevation GmbH
ca628dce90dd Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents: 957
diff changeset
33 *
ca628dce90dd Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents: 957
diff changeset
34 * Author(s):
ca628dce90dd Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents: 957
diff changeset
35 * Thomas Junk <thomas.junk@intevation.de>
1251
d1903250390b splitted mophtool into two components
Markus Kottlaender <markus@intevation.de>
parents: 1249
diff changeset
36 * Markus Kottländer <markus.kottlaender@intevation.de>
1019
ca628dce90dd Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents: 957
diff changeset
37 */
585
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
38 import Layerselect from "./Layerselect";
1123
d9e6a1f6f394 moved all collapse flags for UI elements to store
Markus Kottlaender <markus@intevation.de>
parents: 1121
diff changeset
39 import { mapGetters, mapState } from "vuex";
585
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
40 export default {
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
41 name: "layers",
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
42 components: {
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
43 Layerselect
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
44 },
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
45 computed: {
1121
035dc35e1dfc moved draw layer in map store's layers property
Markus Kottlaender <markus@intevation.de>
parents: 1113
diff changeset
46 ...mapGetters("map", ["layersForLegend"]),
1249
104d41ea7c15 restyling of boxes to save screen space
Markus Kottlaender <markus@intevation.de>
parents: 1247
diff changeset
47 ...mapState("application", ["showLayers"])
585
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
48 },
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
49 methods: {
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
50 visibilityToggled(layer) {
1113
595654ad3f66 renamed mapstore to map (like other stores)
Markus Kottlaender <markus@intevation.de>
parents: 1019
diff changeset
51 this.$store.commit("map/toggleVisibility", layer);
585
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
52 }
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
53 }
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
54 };
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
55 </script>