annotate client/src/components/map/toolbar/Identify.vue @ 1480:9b81ac91a43e

fix: linting
author Thomas Junk <thomas.junk@intevation.de>
date Tue, 04 Dec 2018 10:02:31 +0100
parents 92d9dec88add
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1272
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
1 <template>
1480
9b81ac91a43e fix: linting
Thomas Junk <thomas.junk@intevation.de>
parents: 1414
diff changeset
2 <div
9b81ac91a43e fix: linting
Thomas Junk <thomas.junk@intevation.de>
parents: 1414
diff changeset
3 @click="$store.commit('application/showIdentify', !showIdentify)"
9b81ac91a43e fix: linting
Thomas Junk <thomas.junk@intevation.de>
parents: 1414
diff changeset
4 class="toolbar-button"
9b81ac91a43e fix: linting
Thomas Junk <thomas.junk@intevation.de>
parents: 1414
diff changeset
5 >
9b81ac91a43e fix: linting
Thomas Junk <thomas.junk@intevation.de>
parents: 1414
diff changeset
6 <font-awesome-icon
9b81ac91a43e fix: linting
Thomas Junk <thomas.junk@intevation.de>
parents: 1414
diff changeset
7 icon="info"
9b81ac91a43e fix: linting
Thomas Junk <thomas.junk@intevation.de>
parents: 1414
diff changeset
8 :class="{ 'text-info': showIdentify }"
9b81ac91a43e fix: linting
Thomas Junk <thomas.junk@intevation.de>
parents: 1414
diff changeset
9 ></font-awesome-icon>
9b81ac91a43e fix: linting
Thomas Junk <thomas.junk@intevation.de>
parents: 1414
diff changeset
10 <span
9b81ac91a43e fix: linting
Thomas Junk <thomas.junk@intevation.de>
parents: 1414
diff changeset
11 :class="[
9b81ac91a43e fix: linting
Thomas Junk <thomas.junk@intevation.de>
parents: 1414
diff changeset
12 'indicator',
9b81ac91a43e fix: linting
Thomas Junk <thomas.junk@intevation.de>
parents: 1414
diff changeset
13 {
9b81ac91a43e fix: linting
Thomas Junk <thomas.junk@intevation.de>
parents: 1414
diff changeset
14 show:
9b81ac91a43e fix: linting
Thomas Junk <thomas.junk@intevation.de>
parents: 1414
diff changeset
15 !showIdentify && (identifiedFeatures.length || currentMeasurement)
9b81ac91a43e fix: linting
Thomas Junk <thomas.junk@intevation.de>
parents: 1414
diff changeset
16 }
9b81ac91a43e fix: linting
Thomas Junk <thomas.junk@intevation.de>
parents: 1414
diff changeset
17 ]"
9b81ac91a43e fix: linting
Thomas Junk <thomas.junk@intevation.de>
parents: 1414
diff changeset
18 >
9b81ac91a43e fix: linting
Thomas Junk <thomas.junk@intevation.de>
parents: 1414
diff changeset
19 {{ badgeCount }}
9b81ac91a43e fix: linting
Thomas Junk <thomas.junk@intevation.de>
parents: 1414
diff changeset
20 </span>
9b81ac91a43e fix: linting
Thomas Junk <thomas.junk@intevation.de>
parents: 1414
diff changeset
21 </div>
1272
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
22 </template>
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
23
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
24 <script>
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
25 /* 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
26 * without warranty, see README.md and license for details.
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
27 *
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
28 * SPDX-License-Identifier: AGPL-3.0-or-later
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
29 * License-Filename: LICENSES/AGPL-3.0.txt
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
30 *
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
31 * Copyright (C) 2018 by via donau
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
32 * – Österreichische Wasserstraßen-Gesellschaft mbH
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
33 * Software engineering by Intevation GmbH
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
34 *
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
35 * Author(s):
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
36 * Markus Kottländer <markus.kottlaender@intevation.de>
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
37 */
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
38 import { mapState } from "vuex";
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
39
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
40 export default {
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
41 name: "identify",
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
42 computed: {
1414
92d9dec88add added indicator to info button when identifiedFeatures are present
Markus Kottlaender <markus@intevation.de>
parents: 1299
diff changeset
43 ...mapState("application", ["showIdentify"]),
92d9dec88add added indicator to info button when identifiedFeatures are present
Markus Kottlaender <markus@intevation.de>
parents: 1299
diff changeset
44 ...mapState("map", ["identifiedFeatures", "currentMeasurement"]),
92d9dec88add added indicator to info button when identifiedFeatures are present
Markus Kottlaender <markus@intevation.de>
parents: 1299
diff changeset
45 badgeCount() {
92d9dec88add added indicator to info button when identifiedFeatures are present
Markus Kottlaender <markus@intevation.de>
parents: 1299
diff changeset
46 return this.identifiedFeatures.length + !!this.currentMeasurement;
92d9dec88add added indicator to info button when identifiedFeatures are present
Markus Kottlaender <markus@intevation.de>
parents: 1299
diff changeset
47 }
1272
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
48 }
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
49 };
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
50 </script>