@abi-software/mapintegratedvuer 1.9.1 → 1.9.3-beta.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.
@@ -1,7 +1,7 @@
1
1
  import { PlotVuer as o } from "@abi-software/plotvuer";
2
- import { C as r } from "./ContentMixin-c9DvlJVP.js";
2
+ import { C as r } from "./ContentMixin-W2PTyJZz.js";
3
3
  import { resolveComponent as a, openBlock as n, createBlock as s } from "vue";
4
- import { _ as m } from "./index-qckfB1dl.js";
4
+ import { _ as m } from "./index-DMpfPm6s.js";
5
5
  const p = {
6
6
  name: "Plot",
7
7
  mixins: [r],
@@ -0,0 +1,194 @@
1
+ import { _ as p, k as c, E as l } from "./index-DMpfPm6s.js";
2
+ import { C as g } from "./ContentMixin-W2PTyJZz.js";
3
+ import { ScaffoldVuer as u } from "@abi-software/scaffoldvuer";
4
+ import { resolveComponent as f, openBlock as r, createElementBlock as m, createVNode as y, createBlock as M, createCommentVNode as S } from "vue";
5
+ const w = {
6
+ name: "Scaffold",
7
+ mixins: [g],
8
+ components: {
9
+ ScaffoldVuer: u,
10
+ HelpModeDialog: c
11
+ },
12
+ methods: {
13
+ onResize: function() {
14
+ this.scaffoldCamera.onResize();
15
+ },
16
+ getState: function() {
17
+ return this.$refs.scaffold.getState();
18
+ },
19
+ /**
20
+ * Perform a local search on this contentvuer
21
+ */
22
+ search: function(e) {
23
+ return this.$refs.scaffold.search(e, !0);
24
+ },
25
+ searchSuggestions: function(e, o) {
26
+ if (e === "" || !this.$refs.scaffold)
27
+ return o;
28
+ this.$refs.scaffold.fetchSuggestions(e).forEach((a) => {
29
+ a.suggestion && o.push(a.suggestion);
30
+ });
31
+ },
32
+ /**
33
+ * Handle sync pan zoom event
34
+ */
35
+ handleSyncPanZoomEvent: function(e) {
36
+ if (!this.mouseHovered && e.type !== this.entry.type) {
37
+ const o = e.payload.origin, t = e.payload.size, a = [o[0] + t[0] / 2, o[1] + t[1] / 2], i = [
38
+ (a[0] - 0.5) * 2,
39
+ (0.5 - a[1]) * 2
40
+ ], n = 1 / Math.max(t[0], t[1]);
41
+ this.$refs.scaffold.$module.setSyncControlCenterZoom(
42
+ i,
43
+ n
44
+ );
45
+ }
46
+ },
47
+ displayTooltip: function(e) {
48
+ let o;
49
+ e && (o = e.name), o ? this.$refs.scaffold.search(o, !0) : this.$refs.scaffold.hideRegionTooltip();
50
+ },
51
+ zoomToFeatures: function(e, o) {
52
+ let t;
53
+ Array.isArray(e) ? t = e : t = [e.name], o && this.$refs.scaffold.changeActiveByName(t, "", !1), this.$refs.scaffold.viewRegion(t);
54
+ },
55
+ highlightFeatures: function(e) {
56
+ let o;
57
+ Array.isArray(e) ? o = e : o = [e.name], this.$refs.scaffold.changeHighlightedByName(o, "", !1);
58
+ },
59
+ scaffoldIsReady: function() {
60
+ if (this.scaffoldLoaded = !0, this.$refs.scaffold.$module.graphicsHighlight.highlightColour = [1, 0, 1], this.isVisible()) {
61
+ let e = "free";
62
+ this.entry.rotation && (e = this.entry.rotation), this.$refs.scaffold.toggleSyncControl(this.splitFlowStore.globalCallback, e), this.splitFlowStore.syncMode && this.$refs.scaffold.fitWindow(), this.updateSettings();
63
+ }
64
+ l.emit("mapLoaded", this.$refs.scaffold);
65
+ },
66
+ requestSynchronisedEvent: function(e) {
67
+ if (this.scaffoldLoaded) {
68
+ let o = "free";
69
+ this.entry.rotation && (o = this.entry.rotation), this.$refs.scaffold.toggleSyncControl(e, o);
70
+ }
71
+ },
72
+ /**
73
+ * Callback when the vuers emit a selected event.
74
+ */
75
+ scaffoldHighlighted: function(e, o) {
76
+ var a, i, n;
77
+ const t = {
78
+ paneIndex: this.entry.id,
79
+ type: e,
80
+ resource: o,
81
+ internalName: void 0
82
+ };
83
+ o && o[0] && ((((a = o[0].data) == null ? void 0 : a.id) === void 0 || ((i = o[0].data) == null ? void 0 : i.id) === "") && (o[0].data.id = (n = o[0].data) == null ? void 0 : n.group), t.internalName = o[0].data.id, t.eventType = "highlighted"), this.$emit("resource-selected", t);
84
+ },
85
+ /**
86
+ * Callback when the vuers emit a selected event.
87
+ */
88
+ scaffoldNavigated: function(e, o) {
89
+ if (this.mouseHovered) {
90
+ const t = {
91
+ paneIndex: this.entry.id,
92
+ eventType: "panZoom",
93
+ payload: o,
94
+ type: e
95
+ };
96
+ this.$emit("resource-selected", t);
97
+ }
98
+ },
99
+ updateWithViewUrl: function(e) {
100
+ this.$refs.scaffold.updateViewURL(e);
101
+ },
102
+ /**
103
+ * Change the view mode of the current scaffold
104
+ */
105
+ changeViewingMode: function(e) {
106
+ this.$refs.scaffold.changeViewingMode(e);
107
+ },
108
+ updateSettings: function() {
109
+ const {
110
+ backgroundDisplay: e,
111
+ viewingMode: o
112
+ } = this.settingsStore.globalSettings;
113
+ this.$refs.scaffold.backgroundChangeCallback(e), this.$refs.scaffold.changeViewingMode(o);
114
+ }
115
+ },
116
+ computed: {
117
+ warningMessage: function() {
118
+ return this.entry.isBodyScaffold ? "This map displays the anatomical location and connectivity of nerves, through which the neuron populations from the ApiNATOMY models available in SCKAN can be routed." : "Under active development";
119
+ },
120
+ markerLabels: function() {
121
+ return this.settingsStore.globalSettings.displayMarkers ? this.settingsStore.numberOfDatasetsForFacets : {};
122
+ }
123
+ },
124
+ data: function() {
125
+ return {
126
+ apiLocation: process.env.VUE_APP_API_LOCATION,
127
+ scaffoldCamera: void 0,
128
+ scaffoldLoaded: !1
129
+ };
130
+ },
131
+ mounted: function() {
132
+ this.scaffoldCamera = this.$refs.scaffold.$module.scene.getZincCameraControls(), l.on("startHelp", () => {
133
+ this.startHelp();
134
+ }), l.on("hoverUpdate", () => {
135
+ this.scaffoldLoaded && this.cardHoverHighlight();
136
+ }), l.on("backgroundDisplayUpdate", (e) => {
137
+ this.$refs.scaffold.backgroundChangeCallback(e);
138
+ }), l.on("viewingModeUpdate", (e) => {
139
+ this.$refs.scaffold.changeViewingMode(e);
140
+ });
141
+ }
142
+ }, v = { class: "viewer-container" };
143
+ function b(e, o, t, a, i, n) {
144
+ const d = f("ScaffoldVuer"), h = f("HelpModeDialog");
145
+ return r(), m("div", v, [
146
+ y(d, {
147
+ state: e.entry.state,
148
+ url: e.entry.resource,
149
+ region: e.entry.region,
150
+ onScaffoldSelected: o[0] || (o[0] = (s) => e.resourceSelected(e.entry.type, s, !0)),
151
+ onScaffoldHighlighted: o[1] || (o[1] = (s) => n.scaffoldHighlighted(e.entry.type, s)),
152
+ onScaffoldNavigated: o[2] || (o[2] = (s) => n.scaffoldNavigated(e.entry.type, s)),
153
+ onOnReady: n.scaffoldIsReady,
154
+ onOpenMap: e.openMap,
155
+ ref: "scaffold",
156
+ "background-toggle": !0,
157
+ traditional: !0,
158
+ helpMode: e.helpMode,
159
+ helpModeActiveItem: e.helpModeActiveItem,
160
+ helpModeDialog: e.useHelpModeDialog,
161
+ onAnnotationOpen: e.onAnnotationOpen,
162
+ onAnnotationClose: e.onAnnotationClose,
163
+ onUpdateOfflineAnnotationEnabled: e.updateOfflineAnnotationEnabled,
164
+ annotationSidebar: e.annotationSidebar,
165
+ onHelpModeLastItem: e.onHelpModeLastItem,
166
+ onShownTooltip: e.onTooltipShown,
167
+ onShownMapTooltip: e.onMapTooltipShown,
168
+ render: e.visible,
169
+ "display-latest-message": !0,
170
+ "warning-message": n.warningMessage,
171
+ "display-minimap": !1,
172
+ "display-markers": !1,
173
+ enableOpenMapUI: !0,
174
+ "view-u-r-l": e.entry.viewUrl,
175
+ markerCluster: !0,
176
+ markerLabels: n.markerLabels,
177
+ flatmapAPI: e.flatmapAPI,
178
+ showLocalSettings: e.showLocalSettings,
179
+ showOpenMapButton: e.showOpenMapButton
180
+ }, null, 8, ["state", "url", "region", "onOnReady", "onOpenMap", "helpMode", "helpModeActiveItem", "helpModeDialog", "onAnnotationOpen", "onAnnotationClose", "onUpdateOfflineAnnotationEnabled", "annotationSidebar", "onHelpModeLastItem", "onShownTooltip", "onShownMapTooltip", "render", "warning-message", "view-u-r-l", "markerLabels", "flatmapAPI", "showLocalSettings", "showOpenMapButton"]),
181
+ e.helpMode && e.useHelpModeDialog ? (r(), M(h, {
182
+ key: 0,
183
+ ref: "scaffoldHelp",
184
+ scaffoldRef: e.scaffoldRef,
185
+ lastItem: e.helpModeLastItem,
186
+ onShowNext: e.onHelpModeShowNext,
187
+ onFinishHelpMode: e.onFinishHelpMode
188
+ }, null, 8, ["scaffoldRef", "lastItem", "onShowNext", "onFinishHelpMode"])) : S("", !0)
189
+ ]);
190
+ }
191
+ const k = /* @__PURE__ */ p(w, [["render", b], ["__scopeId", "data-v-57714f72"]]);
192
+ export {
193
+ k as default
194
+ };
@@ -1,7 +1,7 @@
1
- import { C as i } from "./ContentMixin-c9DvlJVP.js";
1
+ import { C as i } from "./ContentMixin-W2PTyJZz.js";
2
2
  import { SimulationVuer as t } from "@abi-software/simulationvuer";
3
3
  import { resolveComponent as e, openBlock as r, createBlock as a } from "vue";
4
- import { _ as m } from "./index-qckfB1dl.js";
4
+ import { _ as m } from "./index-DMpfPm6s.js";
5
5
  const c = {
6
6
  name: "Simulation",
7
7
  mixins: [i],