Mercurial > gemma
annotate client/src/components/toolbar/AvailableFairwayDepth.vue @ 3678:8f58851927c0
client: make layer factory only return new layer config for individual maps
instead of each time it is invoked. The purpose of the factory was to support multiple maps with individual layers.
But returning a new config each time it is invoked leads to bugs that rely on the layer's state. Now this factory
reuses the same objects it created before, per map.
author | Markus Kottlaender <markus@intevation.de> |
---|---|
date | Mon, 17 Jun 2019 17:31:35 +0200 |
parents | 91a3f6835f3d |
children |
rev | line source |
---|---|
3159
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
1 <template> |
3328
91a3f6835f3d
client: toolbar: moved clickevent to button instead of icon
Markus Kottlaender <markus@intevation.de>
parents:
3233
diff
changeset
|
2 <div |
91a3f6835f3d
client: toolbar: moved clickevent to button instead of icon
Markus Kottlaender <markus@intevation.de>
parents:
3233
diff
changeset
|
3 class="toolbar-button" |
91a3f6835f3d
client: toolbar: moved clickevent to button instead of icon
Markus Kottlaender <markus@intevation.de>
parents:
3233
diff
changeset
|
4 v-tooltip.right="label" |
91a3f6835f3d
client: toolbar: moved clickevent to button instead of icon
Markus Kottlaender <markus@intevation.de>
parents:
3233
diff
changeset
|
5 @click="$store.commit('application/showFairwayDepth', !showFairwayDepth)" |
91a3f6835f3d
client: toolbar: moved clickevent to button instead of icon
Markus Kottlaender <markus@intevation.de>
parents:
3233
diff
changeset
|
6 > |
3159
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
7 <font-awesome-icon |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
8 icon="chart-line" |
3231
2dab20bed284
show_statistics: refac to fairwayavailability
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
9 :class="{ 'text-info': showFairwayDepth }" |
3159
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
10 /> |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
11 </div> |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
12 </template> |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
13 |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
14 <script> |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
15 /* This is Free Software under GNU Affero General Public License v >= 3.0 |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
16 * without warranty, see README.md and license for details. |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
17 * |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
18 * SPDX-License-Identifier: AGPL-3.0-or-later |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
19 * License-Filename: LICENSES/AGPL-3.0.txt |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
20 * |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
21 * Copyright (C) 2018 by via donau |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
22 * – Österreichische Wasserstraßen-Gesellschaft mbH |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
23 * Software engineering by Intevation GmbH |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
24 * |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
25 * Author(s): |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
26 * Markus Kottländer <markus.kottlaender@intevation.de> |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
27 * Thomas Junk <thomas.junk@intevation.de> |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
28 */ |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
29 import { mapState } from "vuex"; |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
30 |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
31 export default { |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
32 computed: { |
3231
2dab20bed284
show_statistics: refac to fairwayavailability
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
33 ...mapState("application", ["showFairwayDepth"]), |
3159
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
34 label() { |
3231
2dab20bed284
show_statistics: refac to fairwayavailability
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
35 return this.$gettext("Available fairway depth"); |
3159
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
36 } |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
37 } |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
38 }; |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
39 </script> |