Mercurial > gemma
annotate client/src/components/toolbar/Identify.vue @ 4672:c7dc1a6da93d
fairway_profile: calculate scales
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Tue, 15 Oct 2019 15:55:12 +0200 |
parents | c0162cbb5775 |
children |
rev | line source |
---|---|
1272
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
1 <template> |
1480 | 2 <div |
3 @click="$store.commit('application/showIdentify', !showIdentify)" | |
4 class="toolbar-button" | |
2941
c0162cbb5775
client: toolbar: improved tooltip positions
Markus Kottlaender <markus@intevation.de>
parents:
2919
diff
changeset
|
5 v-tooltip.right="label" |
1480 | 6 > |
2919
6c5364ff0abb
client: removed a lot of unnecessary closing tags
Markus Kottlaender <markus@intevation.de>
parents:
2900
diff
changeset
|
7 <font-awesome-icon icon="info" :class="{ 'text-info': showIdentify }" /> |
1480 | 8 <span |
9 :class="[ | |
10 'indicator', | |
11 { | |
12 show: | |
2370
7fe2f5d334dc
client: improved identify tool readability
Markus Kottlaender <markus@intevation.de>
parents:
1558
diff
changeset
|
13 !showIdentify && |
7fe2f5d334dc
client: improved identify tool readability
Markus Kottlaender <markus@intevation.de>
parents:
1558
diff
changeset
|
14 (filteredIdentifiedFeatures.length || currentMeasurement) |
1480 | 15 } |
16 ]" | |
17 > | |
18 {{ badgeCount }} | |
19 </span> | |
20 </div> | |
1272
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
21 </template> |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
22 |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
23 <script> |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
24 /* This is Free Software under GNU Affero General Public License v >= 3.0 |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
25 * without warranty, see README.md and license for details. |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
26 * |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
27 * SPDX-License-Identifier: AGPL-3.0-or-later |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
28 * License-Filename: LICENSES/AGPL-3.0.txt |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
29 * |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
30 * Copyright (C) 2018 by via donau |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
31 * – Österreichische Wasserstraßen-Gesellschaft mbH |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
32 * Software engineering by Intevation GmbH |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
33 * |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
34 * Author(s): |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
35 * Markus Kottländer <markus.kottlaender@intevation.de> |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
36 */ |
2370
7fe2f5d334dc
client: improved identify tool readability
Markus Kottlaender <markus@intevation.de>
parents:
1558
diff
changeset
|
37 import { mapState, mapGetters } from "vuex"; |
1272
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
38 |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
39 export default { |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
40 name: "identify", |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
41 computed: { |
1414
92d9dec88add
added indicator to info button when identifiedFeatures are present
Markus Kottlaender <markus@intevation.de>
parents:
1299
diff
changeset
|
42 ...mapState("application", ["showIdentify"]), |
2370
7fe2f5d334dc
client: improved identify tool readability
Markus Kottlaender <markus@intevation.de>
parents:
1558
diff
changeset
|
43 ...mapState("map", ["currentMeasurement"]), |
7fe2f5d334dc
client: improved identify tool readability
Markus Kottlaender <markus@intevation.de>
parents:
1558
diff
changeset
|
44 ...mapGetters("map", ["filteredIdentifiedFeatures"]), |
1414
92d9dec88add
added indicator to info button when identifiedFeatures are present
Markus Kottlaender <markus@intevation.de>
parents:
1299
diff
changeset
|
45 badgeCount() { |
2370
7fe2f5d334dc
client: improved identify tool readability
Markus Kottlaender <markus@intevation.de>
parents:
1558
diff
changeset
|
46 return this.filteredIdentifiedFeatures.length + !!this.currentMeasurement; |
2900
2097c3633f0a
client: added tooltips to toolbar buttons
Markus Kottlaender <markus@intevation.de>
parents:
2370
diff
changeset
|
47 }, |
2097c3633f0a
client: added tooltips to toolbar buttons
Markus Kottlaender <markus@intevation.de>
parents:
2370
diff
changeset
|
48 label() { |
2097c3633f0a
client: added tooltips to toolbar buttons
Markus Kottlaender <markus@intevation.de>
parents:
2370
diff
changeset
|
49 return this.$gettext("Identified Features"); |
1414
92d9dec88add
added indicator to info button when identifiedFeatures are present
Markus Kottlaender <markus@intevation.de>
parents:
1299
diff
changeset
|
50 } |
1272
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
51 } |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
52 }; |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
53 </script> |