@abi-software/map-utilities 0.0.0-beta.5 → 0.0.0-beta.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,45 +1,53 @@
1
- <template>
2
- <div class="tooltip-container" id="tooltip-container">
3
- <template v-if="annotationDisplay">
4
- <annotation-popup
5
- :annotationEntry="annotationEntry"
6
- @annotation="$emit('annotation', $event)"
7
- />
8
- </template>
9
- <template v-else>
10
- <provenance-popup :tooltipEntry="tooltipEntry" />
11
- </template>
12
- </div>
13
- </template>
14
-
15
- <script>
16
- export default {
17
- name: "Tooltip",
18
- props: {
19
- tooltipEntry: {
20
- type: Object,
21
- },
22
- annotationDisplay: {
23
- type: Boolean,
24
- default: false,
25
- },
26
- annotationEntry: {
27
- type: Object,
28
- },
29
- },
30
- };
31
- </script>
32
-
33
- <style lang="scss" scoped>
34
- .tooltip-container {
35
- text-align: justify;
36
- border-radius: 4px;
37
- box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
38
- pointer-events: auto;
39
- background: #fff;
40
- border: 1px solid $app-primary-color;
41
- display: flex;
42
- justify-content: center;
43
- align-items: center;
44
- }
45
- </style>
1
+ <template>
2
+ <div class="tooltip-container" id="tooltip-container">
3
+ <template v-if="annotationDisplay">
4
+ <annotation-popup
5
+ :annotationEntry="annotationEntry"
6
+ @annotation="$emit('annotation', $event)"
7
+ />
8
+ </template>
9
+ <template v-else>
10
+ <provenance-popup :tooltipEntry="tooltipEntry" />
11
+ </template>
12
+ </div>
13
+ </template>
14
+
15
+ <script>
16
+ import EventBus from '../EventBus.js';
17
+
18
+ export default {
19
+ name: "Tooltip",
20
+ props: {
21
+ tooltipEntry: {
22
+ type: Object,
23
+ },
24
+ annotationDisplay: {
25
+ type: Boolean,
26
+ default: false,
27
+ },
28
+ annotationEntry: {
29
+ type: Object,
30
+ },
31
+ },
32
+ mounted: function() {
33
+ // Emit events from child components
34
+ EventBus.on("onActionClick", (data) => {
35
+ this.$emit("onActionClick", data);
36
+ });
37
+ },
38
+ };
39
+ </script>
40
+
41
+ <style lang="scss" scoped>
42
+ .tooltip-container {
43
+ text-align: justify;
44
+ border-radius: 4px;
45
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
46
+ pointer-events: auto;
47
+ background: #fff;
48
+ border: 1px solid $app-primary-color;
49
+ display: flex;
50
+ justify-content: center;
51
+ align-items: center;
52
+ }
53
+ </style>