@abi-software/flatmapvuer 1.7.3 → 1.7.4-beta.1
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 +55 -27
- package/dist/flatmapvuer.umd.cjs +40 -40
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/src/components/FlatmapVuer.vue +38 -7
package/dist/flatmapvuer.js
CHANGED
|
@@ -102280,17 +102280,17 @@ const qGt = WGt("main", {
|
|
|
102280
102280
|
* Function to create tooltip for the provided connectivity data.
|
|
102281
102281
|
* @arg {Array} `connectivityData`
|
|
102282
102282
|
*/
|
|
102283
|
-
createTooltipForConnectivity: function(t) {
|
|
102284
|
-
const
|
|
102285
|
-
|
|
102286
|
-
const { label:
|
|
102287
|
-
if (
|
|
102288
|
-
const
|
|
102289
|
-
|
|
102283
|
+
createTooltipForConnectivity: function(t, e) {
|
|
102284
|
+
const r = document.createElement("div");
|
|
102285
|
+
r.classList.add("flatmap-feature-label"), t.forEach((n, i) => {
|
|
102286
|
+
const { label: o } = n;
|
|
102287
|
+
if (r.append(MI(o)), i + 1 < t.length) {
|
|
102288
|
+
const s = document.createElement("hr");
|
|
102289
|
+
r.appendChild(s);
|
|
102290
102290
|
}
|
|
102291
102291
|
}), this.mapImp.showPopup(
|
|
102292
|
-
t[0].featureId,
|
|
102293
102292
|
e,
|
|
102293
|
+
r,
|
|
102294
102294
|
{
|
|
102295
102295
|
className: "custom-popup flatmap-tooltip-popup",
|
|
102296
102296
|
positionAtLastClick: !1,
|
|
@@ -102304,24 +102304,44 @@ const qGt = WGt("main", {
|
|
|
102304
102304
|
* @arg {Object} `payload`
|
|
102305
102305
|
*/
|
|
102306
102306
|
showConnectivityTooltips: function(t) {
|
|
102307
|
-
const { connectivityInfo: e, data: r } = t, n = [], i = [], o = [], s = [];
|
|
102308
|
-
r.length ? r.forEach((
|
|
102309
|
-
|
|
102310
|
-
id:
|
|
102311
|
-
label:
|
|
102307
|
+
const { connectivityInfo: e, data: r } = t, n = [], i = [], o = [], s = [], a = [];
|
|
102308
|
+
if (r.length ? r.forEach((u) => {
|
|
102309
|
+
o.push({
|
|
102310
|
+
id: u.id,
|
|
102311
|
+
label: u.label
|
|
102312
102312
|
});
|
|
102313
|
-
}) : this.removeActiveTooltips(), e && e.featureId && n.push(...e.featureId), this.mapImp
|
|
102314
|
-
|
|
102315
|
-
|
|
102316
|
-
|
|
102317
|
-
|
|
102318
|
-
|
|
102319
|
-
|
|
102320
|
-
|
|
102321
|
-
|
|
102313
|
+
}) : this.removeActiveTooltips(), e && e.featureId && n.push(...e.featureId), this.mapImp) {
|
|
102314
|
+
if (o.forEach((T, f) => {
|
|
102315
|
+
const { id: Q, label: y } = T, _ = this.mapImp.search(Q);
|
|
102316
|
+
if (_ != null && _.results.length) {
|
|
102317
|
+
const L = _ == null ? void 0 : _.results[0].featureId;
|
|
102318
|
+
s.push({
|
|
102319
|
+
featureId: L,
|
|
102320
|
+
id: Q,
|
|
102321
|
+
label: y
|
|
102322
|
+
});
|
|
102323
|
+
} else
|
|
102324
|
+
a.push(T);
|
|
102325
|
+
}), s.length) {
|
|
102326
|
+
let T = s[0].featureId;
|
|
102327
|
+
this.mapImp.annotations.forEach((f) => {
|
|
102328
|
+
const Q = f["anatomical-nodes"];
|
|
102329
|
+
if (Q) {
|
|
102330
|
+
const y = Q.join("");
|
|
102331
|
+
s.every(
|
|
102332
|
+
(L) => y.indexOf(L.id) !== -1
|
|
102333
|
+
) && (T = f.featureId, i.push(T));
|
|
102334
|
+
}
|
|
102335
|
+
}), this.createTooltipForConnectivity(s, T);
|
|
102322
102336
|
} else
|
|
102323
|
-
|
|
102324
|
-
|
|
102337
|
+
a.push(...o), this.removeActiveTooltips();
|
|
102338
|
+
a.length && this.emitConnectivityGraphError(a);
|
|
102339
|
+
const d = [
|
|
102340
|
+
...this.mapImp.modelFeatureIdList(n),
|
|
102341
|
+
...i
|
|
102342
|
+
];
|
|
102343
|
+
this.mapImp.selectGeoJSONFeatures(d);
|
|
102344
|
+
}
|
|
102325
102345
|
},
|
|
102326
102346
|
emitConnectivityGraphError: function(t) {
|
|
102327
102347
|
this.$emit("connectivity-graph-error", {
|
|
@@ -102480,8 +102500,16 @@ const qGt = WGt("main", {
|
|
|
102480
102500
|
* @arg {String} `geometry` _(default: `undefined`)_
|
|
102481
102501
|
*/
|
|
102482
102502
|
displayTooltip: function(t, e = void 0) {
|
|
102503
|
+
var i;
|
|
102483
102504
|
let r, n = { className: "flatmapvuer-popover" };
|
|
102484
|
-
e ? (r = t, n.annotationFeatureGeometry = e) : (r = this.mapImp.modelFeatureIds(t)[0], this.activeDrawTool || (n.positionAtLastClick = !0)), this.connectivityInfoSidebar && this.hasTooltipEntry() && this.viewingMode !== "Annotation"
|
|
102505
|
+
if (e ? (r = t, n.annotationFeatureGeometry = e) : (r = this.mapImp.modelFeatureIds(t)[0], this.activeDrawTool || (n.positionAtLastClick = !0)), this.connectivityInfoSidebar && this.hasTooltipEntry() && this.viewingMode !== "Annotation") {
|
|
102506
|
+
if (this.featuresAlert && (this.tooltipEntry.featuresAlert = this.featuresAlert), (i = this.mapImp.provenance) != null && i.connectivity) {
|
|
102507
|
+
const o = this.mapImp.provenance.connectivity;
|
|
102508
|
+
"knowledge-source" in o ? this.tooltipEntry["knowledge-source"] = o["knowledge-source"] : "npo" in o && (this.tooltipEntry["knowledge-source"] = `${o.npo.release}-npo`);
|
|
102509
|
+
}
|
|
102510
|
+
this.$emit("connectivity-info-open", this.tooltipEntry);
|
|
102511
|
+
}
|
|
102512
|
+
this.annotationSidebar && this.viewingMode === "Annotation" && this.$emit("annotation-open", { annotationEntry: this.annotationEntry, commitCallback: this.commitAnnotationEvent }), !this.disableUI && (this.viewingMode === "Annotation" && !this.annotationSidebar || this.viewingMode === "Exploration" && !this.connectivityInfoSidebar && this.hasTooltipEntry()) && (this.tooltipDisplay = !0, this.$nextTick(() => {
|
|
102485
102513
|
this.mapImp.showPopup(r, this.$refs.tooltip.$el, n), this.popUpCssHacks();
|
|
102486
102514
|
}));
|
|
102487
102515
|
},
|
|
@@ -103191,7 +103219,7 @@ const qGt = WGt("main", {
|
|
|
103191
103219
|
mounted: function() {
|
|
103192
103220
|
this.openMapRef = IQ(this.$refs.openMapRef), this.backgroundIconRef = IQ(this.$refs.backgroundIconRef), this.tooltipWait.length = this.hoverVisibilities.length, this.flatmapQueries = xo(new F4t()), this.flatmapQueries.initialise(this.flatmapAPI), this.state ? this.setStateRequired && this.setState(this.state) : this.renderAtMounted && this.createFlatmap();
|
|
103193
103221
|
}
|
|
103194
|
-
}, Qa = (t) => (KM("data-v-
|
|
103222
|
+
}, Qa = (t) => (KM("data-v-f9adc267"), t = t(), YM(), t), t$t = {
|
|
103195
103223
|
class: "flatmap-container",
|
|
103196
103224
|
ref: "flatmapContainer",
|
|
103197
103225
|
"element-loading-text": "Loading...",
|
|
@@ -103907,7 +103935,7 @@ function L$t(t, e, r, n, i, o) {
|
|
|
103907
103935
|
[ct, t.loading]
|
|
103908
103936
|
]);
|
|
103909
103937
|
}
|
|
103910
|
-
const yJ = /* @__PURE__ */ Og(JGt, [["render", L$t], ["__scopeId", "data-v-
|
|
103938
|
+
const yJ = /* @__PURE__ */ Og(JGt, [["render", L$t], ["__scopeId", "data-v-f9adc267"]]);
|
|
103911
103939
|
function w$t(t) {
|
|
103912
103940
|
return { all: t = t || /* @__PURE__ */ new Map(), on: function(e, r) {
|
|
103913
103941
|
var n = t.get(e);
|