Mercurial > gemma
annotate client/src/layers/Layerselect.vue @ 938:fe923c8ef08f
client: add static legend image to contour_lines
* Add a new image asset `legend_contour_lines.png` and display it
for the "Bottleneck isolines" layer's legend.
* Ensure that the "Bottleneck isolines" layer is not visible at startup.
* Remove some outdated TODOISO and TODOSTYLE comments.
author | Bernhard Reiter <bernhard@intevation.de> |
---|---|
date | Tue, 09 Oct 2018 00:12:12 +0200 |
parents | 959892ffd72c |
children | e833617d1314 |
rev | line source |
---|---|
585
ef307bd6b5d8
refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
1 <template> |
938
fe923c8ef08f
client: add static legend image to contour_lines
Bernhard Reiter <bernhard@intevation.de>
parents:
799
diff
changeset
|
2 <div> |
626
d4fa28bfa6ec
fix: layout minor fixes of buttons and menu
Thomas Junk <thomas.junk@intevation.de>
parents:
585
diff
changeset
|
3 <div class="form-check d-flex flex-row flex-start selection"> |
d4fa28bfa6ec
fix: layout minor fixes of buttons and menu
Thomas Junk <thomas.junk@intevation.de>
parents:
585
diff
changeset
|
4 <input class="form-check-input" @change="visibilityToggled" :id="layername" type="checkbox" :checked="isVisible"> |
799
959892ffd72c
client: add new LegendElement to layerselection box
Bernhard Reiter <bernhard@intevation.de>
parents:
638
diff
changeset
|
5 <LegendElement :layername="layername" :layerindex="layerindex"></LegendElement> |
959892ffd72c
client: add new LegendElement to layerselection box
Bernhard Reiter <bernhard@intevation.de>
parents:
638
diff
changeset
|
6 <label class="layername form-check-label">{{layername}}</label> |
626
d4fa28bfa6ec
fix: layout minor fixes of buttons and menu
Thomas Junk <thomas.junk@intevation.de>
parents:
585
diff
changeset
|
7 </div> |
938
fe923c8ef08f
client: add static legend image to contour_lines
Bernhard Reiter <bernhard@intevation.de>
parents:
799
diff
changeset
|
8 <div v-if="isVisible && (layername == 'Bottleneck isolines')" class="card"> |
fe923c8ef08f
client: add static legend image to contour_lines
Bernhard Reiter <bernhard@intevation.de>
parents:
799
diff
changeset
|
9 <img src="../application/assets/legend_contour_lines.png" |
fe923c8ef08f
client: add static legend image to contour_lines
Bernhard Reiter <bernhard@intevation.de>
parents:
799
diff
changeset
|
10 class="rounded mx-auto d-block"> |
fe923c8ef08f
client: add static legend image to contour_lines
Bernhard Reiter <bernhard@intevation.de>
parents:
799
diff
changeset
|
11 </div> |
fe923c8ef08f
client: add static legend image to contour_lines
Bernhard Reiter <bernhard@intevation.de>
parents:
799
diff
changeset
|
12 </div> |
585
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 |
626
d4fa28bfa6ec
fix: layout minor fixes of buttons and menu
Thomas Junk <thomas.junk@intevation.de>
parents:
585
diff
changeset
|
15 <style lang="scss"> |
d4fa28bfa6ec
fix: layout minor fixes of buttons and menu
Thomas Junk <thomas.junk@intevation.de>
parents:
585
diff
changeset
|
16 .selection { |
d4fa28bfa6ec
fix: layout minor fixes of buttons and menu
Thomas Junk <thomas.junk@intevation.de>
parents:
585
diff
changeset
|
17 text-align: left; |
d4fa28bfa6ec
fix: layout minor fixes of buttons and menu
Thomas Junk <thomas.junk@intevation.de>
parents:
585
diff
changeset
|
18 } |
d4fa28bfa6ec
fix: layout minor fixes of buttons and menu
Thomas Junk <thomas.junk@intevation.de>
parents:
585
diff
changeset
|
19 .layername { |
638
c2f040dba57f
feat: collapsible layer selection
Thomas Junk <thomas.junk@intevation.de>
parents:
626
diff
changeset
|
20 margin-left: $small-offset; |
626
d4fa28bfa6ec
fix: layout minor fixes of buttons and menu
Thomas Junk <thomas.junk@intevation.de>
parents:
585
diff
changeset
|
21 } |
585
ef307bd6b5d8
refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
22 </style> |
ef307bd6b5d8
refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
23 |
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> |
799
959892ffd72c
client: add new LegendElement to layerselection box
Bernhard Reiter <bernhard@intevation.de>
parents:
638
diff
changeset
|
26 import LegendElement from "./LegendElement.vue"; |
585
ef307bd6b5d8
refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
27 export default { |
ef307bd6b5d8
refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
28 props: ["layername", "layerindex", "isVisible"], |
ef307bd6b5d8
refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
29 name: "layerselect", |
799
959892ffd72c
client: add new LegendElement to layerselection box
Bernhard Reiter <bernhard@intevation.de>
parents:
638
diff
changeset
|
30 components: { |
959892ffd72c
client: add new LegendElement to layerselection box
Bernhard Reiter <bernhard@intevation.de>
parents:
638
diff
changeset
|
31 LegendElement |
959892ffd72c
client: add new LegendElement to layerselection box
Bernhard Reiter <bernhard@intevation.de>
parents:
638
diff
changeset
|
32 }, |
585
ef307bd6b5d8
refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
33 methods: { |
ef307bd6b5d8
refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
34 visibilityToggled() { |
ef307bd6b5d8
refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
35 this.$emit("visibilityToggled", this.layerindex); |
ef307bd6b5d8
refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
36 } |
ef307bd6b5d8
refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
37 } |
ef307bd6b5d8
refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
38 }; |
ef307bd6b5d8
refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
39 </script> |