Mercurial > gemma
annotate client/src/layers/Layers.vue @ 626:d4fa28bfa6ec
fix: layout minor fixes of buttons and menu
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Tue, 11 Sep 2018 17:17:37 +0200 |
parents | ef307bd6b5d8 |
children | 8278b2fb0c33 |
rev | line source |
---|---|
585
ef307bd6b5d8
refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
1 <template> |
626
d4fa28bfa6ec
fix: layout minor fixes of buttons and menu
Thomas Junk <thomas.junk@intevation.de>
parents:
585
diff
changeset
|
2 <div class="ui-element card layerselection shadow"> |
d4fa28bfa6ec
fix: layout minor fixes of buttons and menu
Thomas Junk <thomas.junk@intevation.de>
parents:
585
diff
changeset
|
3 <div class="card-body"> |
d4fa28bfa6ec
fix: layout minor fixes of buttons and menu
Thomas Junk <thomas.junk@intevation.de>
parents:
585
diff
changeset
|
4 <div class="headline"> |
d4fa28bfa6ec
fix: layout minor fixes of buttons and menu
Thomas Junk <thomas.junk@intevation.de>
parents:
585
diff
changeset
|
5 <h4 class="card-title">Layers</h4> |
d4fa28bfa6ec
fix: layout minor fixes of buttons and menu
Thomas Junk <thomas.junk@intevation.de>
parents:
585
diff
changeset
|
6 </div> |
d4fa28bfa6ec
fix: layout minor fixes of buttons and menu
Thomas Junk <thomas.junk@intevation.de>
parents:
585
diff
changeset
|
7 <hr> |
d4fa28bfa6ec
fix: layout minor fixes of buttons and menu
Thomas Junk <thomas.junk@intevation.de>
parents:
585
diff
changeset
|
8 <div class="d-flex flex-column"> |
d4fa28bfa6ec
fix: layout minor fixes of buttons and menu
Thomas Junk <thomas.junk@intevation.de>
parents:
585
diff
changeset
|
9 <Layerselect :layerindex="index" :layername="layer.name" v-for="(layer, index) in layers" :key="layer.name" :isVisible="layer.isVisible" @visibilityToggled="visibilityToggled"></Layerselect> |
d4fa28bfa6ec
fix: layout minor fixes of buttons and menu
Thomas Junk <thomas.junk@intevation.de>
parents:
585
diff
changeset
|
10 </div> |
d4fa28bfa6ec
fix: layout minor fixes of buttons and menu
Thomas Junk <thomas.junk@intevation.de>
parents:
585
diff
changeset
|
11 </div> |
585
ef307bd6b5d8
refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
12 </div> |
ef307bd6b5d8
refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
13 </template> |
ef307bd6b5d8
refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
14 |
ef307bd6b5d8
refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
15 <style lang="scss"> |
ef307bd6b5d8
refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
16 @import "../application/assets/application.scss"; |
ef307bd6b5d8
refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
17 |
ef307bd6b5d8
refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
18 .layerselection { |
ef307bd6b5d8
refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
19 background-color: white; |
ef307bd6b5d8
refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
20 margin-left: 0.5rem; |
626
d4fa28bfa6ec
fix: layout minor fixes of buttons and menu
Thomas Junk <thomas.junk@intevation.de>
parents:
585
diff
changeset
|
21 padding: 0.5rem; |
585
ef307bd6b5d8
refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
22 } |
ef307bd6b5d8
refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
23 </style> |
ef307bd6b5d8
refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
24 |
ef307bd6b5d8
refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
25 <script> |
ef307bd6b5d8
refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
26 import Layerselect from "./Layerselect"; |
ef307bd6b5d8
refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
27 import { mapGetters } from "vuex"; |
ef307bd6b5d8
refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
28 export default { |
ef307bd6b5d8
refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
29 name: "layers", |
ef307bd6b5d8
refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
30 components: { |
ef307bd6b5d8
refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
31 Layerselect |
ef307bd6b5d8
refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
32 }, |
ef307bd6b5d8
refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
33 computed: { |
ef307bd6b5d8
refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
34 ...mapGetters("mapstore", ["layers"]) |
ef307bd6b5d8
refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
35 }, |
ef307bd6b5d8
refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
36 methods: { |
ef307bd6b5d8
refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
37 visibilityToggled(layer) { |
ef307bd6b5d8
refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
38 this.$store.commit("mapstore/toggleVisibility", layer); |
ef307bd6b5d8
refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
39 } |
ef307bd6b5d8
refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
40 } |
ef307bd6b5d8
refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
41 }; |
ef307bd6b5d8
refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
42 </script> |