@abi-software/mapintegratedvuer 1.2.0-beta.3 → 1.2.0-beta.4

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,12 +1,12 @@
1
- import { mapStores as i } from "pinia";
2
- import { u as n } from "./index-BVYbfsK6.js";
3
- const p = function(r) {
1
+ import { mapStores as n } from "pinia";
2
+ import { u as p } from "./index-DpNLzVAL.js";
3
+ const d = function(r) {
4
4
  return r ? [...new Set(r.map((e) => JSON.stringify(e)))].map(
5
5
  (e) => JSON.parse(e)
6
6
  ) : [];
7
- }, u = {
7
+ }, f = {
8
8
  computed: {
9
- ...i(n)
9
+ ...n(p)
10
10
  },
11
11
  methods: {
12
12
  flatmapPanZoomCallback: function(r) {
@@ -29,16 +29,29 @@ const p = function(r) {
29
29
  return;
30
30
  let e = r;
31
31
  if (e || (e = this.getFlatmapImp()), e) {
32
- let t = this.settingsStore.markers;
33
- t = p(t), e.clearMarkers(), e.clearDatasetMarkers(), e.addDatasetMarkers(t);
34
- let m = this.settingsStore.hoveredMarkers, a = this.settingsStore.previousHoveredMarkers;
35
- m.forEach((s) => {
36
- e.addMarker(s, { className: "standard-marker hovered", cluster: !1 });
37
- }), a !== null && a.length >= 0 && a.forEach((s) => {
38
- e.addMarker(s, { className: "standard-marker", cluster: !0 });
32
+ let m = this.settingsStore.markers;
33
+ m = d(m);
34
+ let i = this.removeMarkersNotOnFlatmap(e, m);
35
+ e.clearMarkers(), e.clearDatasetMarkers(), e.addDatasetMarkers(i);
36
+ let l = this.settingsStore.hoveredMarkers, t = this.settingsStore.previousHoveredMarkers;
37
+ l.forEach((a) => {
38
+ e.addMarker(a, { className: "standard-marker hovered", cluster: !1 });
39
+ }), t !== null && t.length >= 0 && t.forEach((a) => {
40
+ e.addMarker(a, { className: "standard-marker", cluster: !0 });
39
41
  }), this.entry.type === "MultiFlatmap" && this.restoreFeaturedMarkers(e);
40
42
  }
41
43
  },
44
+ // removeMarkersNotOnFlatmap: rewrites the dataset marker list to only include markers that are on the flatmap
45
+ removeMarkersNotOnFlatmap(r, e) {
46
+ let m = r.anatomicalIdentifiers, i = [];
47
+ for (let l = 0; l < e.length; l++) {
48
+ let t = e[l], a = { id: t.id, terms: [] };
49
+ for (let s = 0; s < t.terms.length; s++)
50
+ m.includes(t.terms[s]) && a.terms.push(t.terms[s]);
51
+ i.push(a);
52
+ }
53
+ return i;
54
+ },
42
55
  flatmapReadyForMarkerUpdates: function(r) {
43
56
  if (r) {
44
57
  r.enablePanZoomEvents(!0), this.flatmapReady = !0;
@@ -49,5 +62,5 @@ const p = function(r) {
49
62
  }
50
63
  };
51
64
  export {
52
- u as D
65
+ f as D
53
66
  };