Mercurial > gemma
annotate client/src/linetool/Linetool.vue @ 1027:04a9e78dcc5f
refac: remove morphstore. not necessary
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Wed, 24 Oct 2018 14:17:51 +0200 |
parents | ca628dce90dd |
children | e3df77b8074f |
rev | line source |
---|---|
649 | 1 <template> |
2 <div @click="drawLine" class="ui-element d-flex shadow drawtool"> | |
3 <i :class="icon"></i> | |
4 </div> | |
5 </template> | |
6 | |
7 <style lang="scss"> | |
8 .drawtool { | |
9 position: absolute; | |
10 bottom: 0; | |
11 right: 0; | |
12 background-color: white; | |
13 padding: $small-offset; | |
14 border-radius: $border-radius; | |
15 margin-left: $offset; | |
16 height: $icon-width; | |
17 width: $icon-height; | |
18 margin-bottom: $offset; | |
19 margin-right: $offset; | |
20 z-index: 2; | |
21 } | |
752
f09cbe80a864
refac: small improvements
Thomas Junk <thomas.junk@intevation.de>
parents:
649
diff
changeset
|
22 |
903
2990a878b16b
fix cut with scissors
Thomas Junk <thomas.junk@intevation.de>
parents:
752
diff
changeset
|
23 .inverted { |
752
f09cbe80a864
refac: small improvements
Thomas Junk <thomas.junk@intevation.de>
parents:
649
diff
changeset
|
24 color: #0077ff; |
f09cbe80a864
refac: small improvements
Thomas Junk <thomas.junk@intevation.de>
parents:
649
diff
changeset
|
25 } |
649 | 26 </style> |
27 | |
28 <script> | |
1019
ca628dce90dd
Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents:
975
diff
changeset
|
29 /* |
ca628dce90dd
Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents:
975
diff
changeset
|
30 * This is Free Software under GNU Affero General Public License v >= 3.0 |
ca628dce90dd
Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents:
975
diff
changeset
|
31 * without warranty, see README.md and license for details. |
ca628dce90dd
Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents:
975
diff
changeset
|
32 * |
ca628dce90dd
Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents:
975
diff
changeset
|
33 * SPDX-License-Identifier: AGPL-3.0-or-later |
ca628dce90dd
Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents:
975
diff
changeset
|
34 * License-Filename: LICENSES/AGPL-3.0.txt |
ca628dce90dd
Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents:
975
diff
changeset
|
35 * |
ca628dce90dd
Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents:
975
diff
changeset
|
36 * Copyright (C) 2018 by via donau |
ca628dce90dd
Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents:
975
diff
changeset
|
37 * – Österreichische Wasserstraßen-Gesellschaft mbH |
ca628dce90dd
Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents:
975
diff
changeset
|
38 * Software engineering by Intevation GmbH |
ca628dce90dd
Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents:
975
diff
changeset
|
39 * |
ca628dce90dd
Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents:
975
diff
changeset
|
40 * Author(s): |
ca628dce90dd
Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents:
975
diff
changeset
|
41 * Thomas Junk <thomas.junk@intevation.de> |
ca628dce90dd
Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents:
975
diff
changeset
|
42 */ |
903
2990a878b16b
fix cut with scissors
Thomas Junk <thomas.junk@intevation.de>
parents:
752
diff
changeset
|
43 import { mapGetters, mapState } from "vuex"; |
649 | 44 |
45 export default { | |
46 name: "linetool", | |
47 methods: { | |
48 drawLine() { | |
49 this.$store.commit("application/toggleDrawModeLine"); | |
50 } | |
51 }, | |
52 computed: { | |
53 ...mapGetters("application", ["drawMode"]), | |
1027
04a9e78dcc5f
refac: remove morphstore. not necessary
Thomas Junk <thomas.junk@intevation.de>
parents:
1019
diff
changeset
|
54 ...mapState("identifystore", ["identifiedFeatures"]), |
04a9e78dcc5f
refac: remove morphstore. not necessary
Thomas Junk <thomas.junk@intevation.de>
parents:
1019
diff
changeset
|
55 ...mapState("fairwayprofile", ["selectedMorph"]), |
649 | 56 icon() { |
57 return { | |
58 fa: true, | |
903
2990a878b16b
fix cut with scissors
Thomas Junk <thomas.junk@intevation.de>
parents:
752
diff
changeset
|
59 "fa-pencil": !this.selectedMorph, |
2990a878b16b
fix cut with scissors
Thomas Junk <thomas.junk@intevation.de>
parents:
752
diff
changeset
|
60 "fa-pencil inverted": !this.selectedMorph && this.drawMode, |
2990a878b16b
fix cut with scissors
Thomas Junk <thomas.junk@intevation.de>
parents:
752
diff
changeset
|
61 "fa-cut": this.selectedMorph, |
2990a878b16b
fix cut with scissors
Thomas Junk <thomas.junk@intevation.de>
parents:
752
diff
changeset
|
62 "fa-cut inverted": this.selectedMorph && this.drawMode |
649 | 63 }; |
64 } | |
65 } | |
66 }; | |
67 </script> |