@abi-software/flatmapvuer 1.12.1 → 1.12.2-demo.0
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.
- package/dist/flatmapvuer.js +44 -13
- package/dist/flatmapvuer.umd.cjs +3 -3
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/FlatmapVuer.vue +29 -12
- package/src/components/MultiFlatmapVuer.vue +14 -0
- package/src/components.d.ts +2 -0
package/package.json
CHANGED
|
@@ -1283,6 +1283,11 @@ export default {
|
|
|
1283
1283
|
if (this.$refs.pathwaysSelection) {
|
|
1284
1284
|
this.$refs.pathwaysSelection.reset()
|
|
1285
1285
|
}
|
|
1286
|
+
|
|
1287
|
+
this.trackEvent({
|
|
1288
|
+
'event_name': `portal_maps_zoom`,
|
|
1289
|
+
'category': 'reset',
|
|
1290
|
+
});
|
|
1286
1291
|
}
|
|
1287
1292
|
},
|
|
1288
1293
|
/**
|
|
@@ -1293,6 +1298,11 @@ export default {
|
|
|
1293
1298
|
zoomIn: function () {
|
|
1294
1299
|
if (this.mapImp) {
|
|
1295
1300
|
this.mapImp.zoomIn()
|
|
1301
|
+
|
|
1302
|
+
this.trackEvent({
|
|
1303
|
+
'event_name': `portal_maps_zoom`,
|
|
1304
|
+
'category': 'zoom_in',
|
|
1305
|
+
});
|
|
1296
1306
|
}
|
|
1297
1307
|
},
|
|
1298
1308
|
/**
|
|
@@ -1303,6 +1313,11 @@ export default {
|
|
|
1303
1313
|
zoomOut: function () {
|
|
1304
1314
|
if (this.mapImp) {
|
|
1305
1315
|
this.mapImp.zoomOut()
|
|
1316
|
+
|
|
1317
|
+
this.trackEvent({
|
|
1318
|
+
'event_name': `portal_maps_zoom`,
|
|
1319
|
+
'category': 'zoom_out',
|
|
1320
|
+
});
|
|
1306
1321
|
}
|
|
1307
1322
|
},
|
|
1308
1323
|
onSelectionsDataChanged: function (data) {
|
|
@@ -2158,18 +2173,7 @@ export default {
|
|
|
2158
2173
|
});
|
|
2159
2174
|
} else {
|
|
2160
2175
|
// clicking on paths
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
// for neuron connection mode "all"
|
|
2164
|
-
if (this.connectionType.toLowerCase() === 'all') {
|
|
2165
|
-
this.$emit('neuron-connection-feature-click', {
|
|
2166
|
-
filters: [],
|
|
2167
|
-
search: searchTerms,
|
|
2168
|
-
});
|
|
2169
|
-
} else {
|
|
2170
|
-
// for neuron connection mode "origin", "via" and "destination"
|
|
2171
|
-
await this.openConnectivityInfo(data);
|
|
2172
|
-
}
|
|
2176
|
+
await this.openConnectivityInfo(data);
|
|
2173
2177
|
}
|
|
2174
2178
|
} else {
|
|
2175
2179
|
await this.openConnectivityInfo(data);
|
|
@@ -3162,6 +3166,19 @@ export default {
|
|
|
3162
3166
|
setConnectionType: function (type) {
|
|
3163
3167
|
this.connectionType = type;
|
|
3164
3168
|
},
|
|
3169
|
+
/**
|
|
3170
|
+
* @public
|
|
3171
|
+
* Function to track events.
|
|
3172
|
+
* @arg {Object} `data`
|
|
3173
|
+
*/
|
|
3174
|
+
trackEvent: function (data) {
|
|
3175
|
+
const taggingData = {
|
|
3176
|
+
'event': 'interaction_event',
|
|
3177
|
+
'location': 'flatmap',
|
|
3178
|
+
...data,
|
|
3179
|
+
};
|
|
3180
|
+
this.$emit('trackEvent', taggingData);
|
|
3181
|
+
},
|
|
3165
3182
|
},
|
|
3166
3183
|
props: {
|
|
3167
3184
|
/**
|
|
@@ -93,6 +93,7 @@
|
|
|
93
93
|
:showLocalSettings="showLocalSettings"
|
|
94
94
|
:showOpenMapButton="showOpenMapButton"
|
|
95
95
|
:showPathwayFilter="showPathwayFilter"
|
|
96
|
+
@trackEvent="trackEvent"
|
|
96
97
|
:externalLegends="externalLegends"
|
|
97
98
|
/>
|
|
98
99
|
|
|
@@ -643,6 +644,19 @@ export default {
|
|
|
643
644
|
let map = this.getCurrentFlatmap();
|
|
644
645
|
map.setConnectionType(type);
|
|
645
646
|
},
|
|
647
|
+
/**
|
|
648
|
+
* @public
|
|
649
|
+
* Function to track events.
|
|
650
|
+
* @arg {Object} `data`
|
|
651
|
+
*/
|
|
652
|
+
trackEvent: function (data) {
|
|
653
|
+
const taggingData = {
|
|
654
|
+
'event': 'interaction_event',
|
|
655
|
+
'location': 'flatmap',
|
|
656
|
+
...data,
|
|
657
|
+
};
|
|
658
|
+
this.$emit('trackEvent', taggingData);
|
|
659
|
+
},
|
|
646
660
|
},
|
|
647
661
|
props: {
|
|
648
662
|
/**
|
package/src/components.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export {}
|
|
|
8
8
|
declare module 'vue' {
|
|
9
9
|
export interface GlobalComponents {
|
|
10
10
|
DynamicLegends: typeof import('./components/legends/DynamicLegends.vue')['default']
|
|
11
|
+
ElAutocomplete: typeof import('element-plus/es')['ElAutocomplete']
|
|
11
12
|
ElButton: typeof import('element-plus/es')['ElButton']
|
|
12
13
|
ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
|
|
13
14
|
ElCheckboxGroup: typeof import('element-plus/es')['ElCheckboxGroup']
|
|
@@ -24,6 +25,7 @@ declare module 'vue' {
|
|
|
24
25
|
ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
|
|
25
26
|
ElRow: typeof import('element-plus/es')['ElRow']
|
|
26
27
|
ElSelect: typeof import('element-plus/es')['ElSelect']
|
|
28
|
+
ElSwitch: typeof import('element-plus/es')['ElSwitch']
|
|
27
29
|
FlatmapError: typeof import('./components/FlatmapError.vue')['default']
|
|
28
30
|
FlatmapVuer: typeof import('./components/FlatmapVuer.vue')['default']
|
|
29
31
|
LegendItem: typeof import('./components/legends/LegendItem.vue')['default']
|