@abi-software/mapintegratedvuer 1.20.0 → 1.21.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/cypress.config.js +8 -7
- package/dist/ConnectivityGraph-CZMROk9r.js +121 -0
- package/dist/ContentMixin-Vn34n5t2.js +1672 -0
- package/dist/DynamicMarkerMixin-B087dVL_.js +50 -0
- package/dist/Flatmap-Bm7m_5m_.js +193 -0
- package/dist/Iframe-BWbhTjCR.js +18 -0
- package/dist/MultiFlatmap-JziqSEwL.js +303 -0
- package/dist/Plot-ChbPsDZX.js +28 -0
- package/dist/Scaffold-C6f7c7Ha.js +308 -0
- package/dist/Simulation-DcJScRYo.js +25 -0
- package/dist/connectivities-UXTqf7_0.js +35743 -0
- package/dist/mapintegratedvuer.js +43234 -3
- package/dist/mapintegratedvuer.umd.cjs +556 -297
- package/dist/style.css +2 -1
- package/eslint.config.js +33 -0
- package/package.json +61 -76
- package/src/App.vue +58 -24
- package/src/assets/fonts.scss +2 -0
- package/src/assets/header-icon.scss +2 -1
- package/src/assets/styles.scss +2 -3
- package/src/components/CustomSplitter.vue +3 -3
- package/src/components/MapContent.vue +11 -0
- package/src/components/SearchControls.vue +1 -1
- package/src/components/SplitFlow.vue +6 -5
- package/src/components/index.js +1 -0
- package/src/components/scripts/simulation_data.js +461 -0
- package/src/components/viewers/Flatmap.vue +13 -8
- package/src/components/viewers/MultiFlatmap.vue +13 -8
- package/src/components.d.ts +6 -2
- package/src/main.js +2 -1
- package/src/mixins/ContentMixin.js +81 -1
- package/vite.bundle-build.js +19 -4
- package/vite.config.js +16 -1
- package/babel.config.js +0 -0
- package/dist/ConnectivityGraph-B2xlAebI.js +0 -123
- package/dist/ContentMixin-jHFoA2A8.js +0 -1675
- package/dist/Flatmap-CBB2P9Ql.js +0 -202
- package/dist/Iframe-BXPDKp2g.js +0 -20
- package/dist/MultiFlatmap-BPUGtzDT.js +0 -316
- package/dist/Plot-CAAiTTub.js +0 -25
- package/dist/Scaffold-oW-i75jl.js +0 -305
- package/dist/Simulation-D5BM15nU.js +0 -28
- package/dist/index-B6Cnscja.js +0 -79215
- package/dist/style-DuFTyFX4.js +0 -57
- package/static.json +0 -7
|
@@ -0,0 +1,461 @@
|
|
|
1
|
+
let minF = undefined;
|
|
2
|
+
let maxF = undefined;
|
|
3
|
+
let minVol = undefined;
|
|
4
|
+
let maxVol = undefined;
|
|
5
|
+
|
|
6
|
+
const fvData = {
|
|
7
|
+
"compartments": [
|
|
8
|
+
{
|
|
9
|
+
"flow": 0.049699,
|
|
10
|
+
"name": "RUL Anterior",
|
|
11
|
+
"number": 1,
|
|
12
|
+
"volumes": [
|
|
13
|
+
{
|
|
14
|
+
"time": 1.0,
|
|
15
|
+
"volume": 181987.21791976015
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"time": 3.0,
|
|
19
|
+
"volume": 190654.20796455297
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"time": 5.0,
|
|
23
|
+
"volume": 197903.5873118482
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"flow": 0.0612,
|
|
29
|
+
"name": "RUL Posterior",
|
|
30
|
+
"number": 2,
|
|
31
|
+
"volumes": [
|
|
32
|
+
{
|
|
33
|
+
"time": 1.0,
|
|
34
|
+
"volume": 201042.2999957783
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"time": 3.0,
|
|
38
|
+
"volume": 223166.3550326552
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"time": 5.0,
|
|
42
|
+
"volume": 224107.48977724495
|
|
43
|
+
}
|
|
44
|
+
]
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"flow": 0.082407,
|
|
48
|
+
"name": "RUL Apical",
|
|
49
|
+
"number": 3,
|
|
50
|
+
"volumes": [
|
|
51
|
+
{
|
|
52
|
+
"time": 1.0,
|
|
53
|
+
"volume": 245471.83628595909
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"time": 3.0,
|
|
57
|
+
"volume": 257765.65591976934
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"time": 5.0,
|
|
61
|
+
"volume": 268162.69688902283
|
|
62
|
+
}
|
|
63
|
+
]
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"flow": 0.046921,
|
|
67
|
+
"name": "RML Lateral",
|
|
68
|
+
"number": 4,
|
|
69
|
+
"volumes": [
|
|
70
|
+
{
|
|
71
|
+
"time": 1.0,
|
|
72
|
+
"volume": 136749.2302777965
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"time": 3.0,
|
|
76
|
+
"volume": 142354.54619401656
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"time": 5.0,
|
|
80
|
+
"volume": 144871.90605963918
|
|
81
|
+
}
|
|
82
|
+
]
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"flow": 0.041519,
|
|
86
|
+
"name": "RML Medial",
|
|
87
|
+
"number": 5,
|
|
88
|
+
"volumes": [
|
|
89
|
+
{
|
|
90
|
+
"time": 1.0,
|
|
91
|
+
"volume": 149373.3982901215
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"time": 3.0,
|
|
95
|
+
"volume": 157328.6444732329
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"time": 5.0,
|
|
99
|
+
"volume": 158140.25438088493
|
|
100
|
+
}
|
|
101
|
+
]
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"flow": 0.063307,
|
|
105
|
+
"name": "RLL Posterior",
|
|
106
|
+
"number": 6,
|
|
107
|
+
"volumes": [
|
|
108
|
+
{
|
|
109
|
+
"time": 1.0,
|
|
110
|
+
"volume": 186775.46800209297
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"time": 3.0,
|
|
114
|
+
"volume": 192966.52104661157
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"time": 5.0,
|
|
118
|
+
"volume": 205857.97557974615
|
|
119
|
+
}
|
|
120
|
+
]
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"flow": 0.065394,
|
|
124
|
+
"name": "RLL Medial",
|
|
125
|
+
"number": 7,
|
|
126
|
+
"volumes": [
|
|
127
|
+
{
|
|
128
|
+
"time": 1.0,
|
|
129
|
+
"volume": 194824.7466953374
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"time": 3.0,
|
|
133
|
+
"volume": 217874.6619392152
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"time": 5.0,
|
|
137
|
+
"volume": 217381.52321902165
|
|
138
|
+
}
|
|
139
|
+
]
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"flow": 0.056798,
|
|
143
|
+
"name": "RLL Anterior",
|
|
144
|
+
"number": 8,
|
|
145
|
+
"volumes": [
|
|
146
|
+
{
|
|
147
|
+
"time": 1.0,
|
|
148
|
+
"volume": 215680.0182455645
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"time": 3.0,
|
|
152
|
+
"volume": 219453.77944698493
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"time": 5.0,
|
|
156
|
+
"volume": 231581.60138050313
|
|
157
|
+
}
|
|
158
|
+
]
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"flow": 0.081373,
|
|
162
|
+
"name": "RLL Superior",
|
|
163
|
+
"number": 9,
|
|
164
|
+
"volumes": [
|
|
165
|
+
{
|
|
166
|
+
"time": 1.0,
|
|
167
|
+
"volume": 244625.5581985565
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"time": 3.0,
|
|
171
|
+
"volume": 266792.0850557373
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"time": 5.0,
|
|
175
|
+
"volume": 284087.3333850801
|
|
176
|
+
}
|
|
177
|
+
]
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
"flow": 0.056684,
|
|
181
|
+
"name": "LUL Posterior",
|
|
182
|
+
"number": 10,
|
|
183
|
+
"volumes": [
|
|
184
|
+
{
|
|
185
|
+
"time": 1.0,
|
|
186
|
+
"volume": 172196.7437707655
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"time": 3.0,
|
|
190
|
+
"volume": 181443.25253755006
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
"time": 5.0,
|
|
194
|
+
"volume": 191012.60480114556
|
|
195
|
+
}
|
|
196
|
+
]
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
"flow": 0.038741,
|
|
200
|
+
"name": "LUL Anterior",
|
|
201
|
+
"number": 11,
|
|
202
|
+
"volumes": [
|
|
203
|
+
{
|
|
204
|
+
"time": 1.0,
|
|
205
|
+
"volume": 167290.43470213015
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
"time": 3.0,
|
|
209
|
+
"volume": 181601.44836610503
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
"time": 5.0,
|
|
213
|
+
"volume": 186127.32231959977
|
|
214
|
+
}
|
|
215
|
+
]
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
"flow": 0.038449,
|
|
219
|
+
"name": "LUL Lingular",
|
|
220
|
+
"number": 12,
|
|
221
|
+
"volumes": [
|
|
222
|
+
{
|
|
223
|
+
"time": 1.0,
|
|
224
|
+
"volume": 141906.787889736
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
"time": 3.0,
|
|
228
|
+
"volume": 141671.55047498783
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
"time": 5.0,
|
|
232
|
+
"volume": 152307.21920357717
|
|
233
|
+
}
|
|
234
|
+
]
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
"flow": 0.055762,
|
|
238
|
+
"name": "LUL Apical",
|
|
239
|
+
"number": 13,
|
|
240
|
+
"volumes": [
|
|
241
|
+
{
|
|
242
|
+
"time": 1.0,
|
|
243
|
+
"volume": 218466.22444789423
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
"time": 3.0,
|
|
247
|
+
"volume": 251686.08493242075
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
"time": 5.0,
|
|
251
|
+
"volume": 250175.1790429858
|
|
252
|
+
}
|
|
253
|
+
]
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
"flow": 0.045985,
|
|
257
|
+
"name": "LLL Posterior",
|
|
258
|
+
"number": 14,
|
|
259
|
+
"volumes": [
|
|
260
|
+
{
|
|
261
|
+
"time": 1.0,
|
|
262
|
+
"volume": 138039.9756600753
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
"time": 3.0,
|
|
266
|
+
"volume": 137909.5791278306
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
"time": 5.0,
|
|
270
|
+
"volume": 160653.0149818861
|
|
271
|
+
}
|
|
272
|
+
]
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
"flow": 0.057459,
|
|
276
|
+
"name": "LLL Superior",
|
|
277
|
+
"number": 15,
|
|
278
|
+
"volumes": [
|
|
279
|
+
{
|
|
280
|
+
"time": 1.0,
|
|
281
|
+
"volume": 193934.96452631807
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
"time": 3.0,
|
|
285
|
+
"volume": 218445.44410386705
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
"time": 5.0,
|
|
289
|
+
"volume": 220963.58880308812
|
|
290
|
+
}
|
|
291
|
+
]
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
"flow": 0.053836,
|
|
295
|
+
"name": "LLL Medial",
|
|
296
|
+
"number": 16,
|
|
297
|
+
"volumes": [
|
|
298
|
+
{
|
|
299
|
+
"time": 1.0,
|
|
300
|
+
"volume": 201521.12178046367
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
"time": 3.0,
|
|
304
|
+
"volume": 233287.44183763085
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
"time": 5.0,
|
|
308
|
+
"volume": 203887.33003463238
|
|
309
|
+
}
|
|
310
|
+
]
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
"flow": 0.051704,
|
|
314
|
+
"name": "LLL Anterior",
|
|
315
|
+
"number": 17,
|
|
316
|
+
"volumes": [
|
|
317
|
+
{
|
|
318
|
+
"time": 1.0,
|
|
319
|
+
"volume": 188226.65055088204
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
"time": 3.0,
|
|
323
|
+
"volume": 189234.8102624248
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
"time": 5.0,
|
|
327
|
+
"volume": 211763.78024920568
|
|
328
|
+
}
|
|
329
|
+
]
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
"flow": 0.052762,
|
|
333
|
+
"name": "LLL Lateral",
|
|
334
|
+
"number": 18,
|
|
335
|
+
"volumes": [
|
|
336
|
+
{
|
|
337
|
+
"time": 1.0,
|
|
338
|
+
"volume": 157340.55375980627
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
"time": 3.0,
|
|
342
|
+
"volume": 160912.90618797182
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
"time": 5.0,
|
|
346
|
+
"volume": 193000.8440869187
|
|
347
|
+
}
|
|
348
|
+
]
|
|
349
|
+
}
|
|
350
|
+
],
|
|
351
|
+
"left lung": {
|
|
352
|
+
"flow": 0.45138,
|
|
353
|
+
"sum compartment flow": 0.45138199999999995,
|
|
354
|
+
"volumes": [
|
|
355
|
+
{
|
|
356
|
+
"sum compartment volume": 1578923.4570880714,
|
|
357
|
+
"time": 1.0,
|
|
358
|
+
"volume": 3335453.2309989794
|
|
359
|
+
},
|
|
360
|
+
{
|
|
361
|
+
"sum compartment volume": 1696192.517830789,
|
|
362
|
+
"time": 3.0,
|
|
363
|
+
"volume": 3564548.974903552
|
|
364
|
+
},
|
|
365
|
+
{
|
|
366
|
+
"sum compartment volume": 1769890.8835230393,
|
|
367
|
+
"time": 5.0,
|
|
368
|
+
"volume": 3701985.251506051
|
|
369
|
+
}
|
|
370
|
+
]
|
|
371
|
+
},
|
|
372
|
+
"right lung": {
|
|
373
|
+
"flow": 0.54862,
|
|
374
|
+
"sum compartment flow": 0.5486179999999999,
|
|
375
|
+
"volumes": [
|
|
376
|
+
{
|
|
377
|
+
"sum compartment volume": 1756529.773910967,
|
|
378
|
+
"time": 1.0,
|
|
379
|
+
"volume": 3335453.2309989794
|
|
380
|
+
},
|
|
381
|
+
{
|
|
382
|
+
"sum compartment volume": 1868356.4570727758,
|
|
383
|
+
"time": 3.0,
|
|
384
|
+
"volume": 3564548.974903552
|
|
385
|
+
},
|
|
386
|
+
{
|
|
387
|
+
"sum compartment volume": 1932094.367982991,
|
|
388
|
+
"time": 5.0,
|
|
389
|
+
"volume": 3701985.251506051
|
|
390
|
+
}
|
|
391
|
+
]
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
const getFlowAndVolume = (compartment, time) => {
|
|
396
|
+
if (compartment) {
|
|
397
|
+
const entry = fvData.compartments.find(
|
|
398
|
+
element => element.name === compartment);
|
|
399
|
+
if (!entry) return {};
|
|
400
|
+
|
|
401
|
+
const min = 1.0, max = 5.0;
|
|
402
|
+
const range = max - min;
|
|
403
|
+
const nT = time / 100.0 * range + min;
|
|
404
|
+
const v3 = entry.volumes.find(element => element.time === 3.0);
|
|
405
|
+
let volume = 0;
|
|
406
|
+
const flow = entry.flow;
|
|
407
|
+
if (1.0 <= nT && nT <= 3.0) {
|
|
408
|
+
const v1 = entry.volumes.find(element => element.time === 1.0);
|
|
409
|
+
const ratio = (nT - 1.0) / 2.0;
|
|
410
|
+
volume = (1.0 - ratio) * v1.volume + ratio * v3.volume;
|
|
411
|
+
} else {
|
|
412
|
+
const v5 = entry.volumes.find(element => element.time === 5.0);
|
|
413
|
+
const ratio = (nT - 3.0) / 2.0;
|
|
414
|
+
volume = (1.0 - ratio) * v3.volume + ratio * v5.volume;
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
return { flow, volume };
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
const calculateMinMax = () => {
|
|
422
|
+
if (minVol === undefined) {
|
|
423
|
+
fvData.compartments.forEach((ele) => {
|
|
424
|
+
const vol = ele.volumes.find(v => v.time === 1.0).volume;
|
|
425
|
+
const flow = ele.flow;
|
|
426
|
+
console.log(vol, flow)
|
|
427
|
+
if (minVol === undefined || vol < minVol) {
|
|
428
|
+
minVol = vol;
|
|
429
|
+
}
|
|
430
|
+
if (maxVol === undefined || vol > maxVol) {
|
|
431
|
+
maxVol = vol;
|
|
432
|
+
}
|
|
433
|
+
if (minF === undefined || flow < minF) {
|
|
434
|
+
minF = flow;
|
|
435
|
+
}
|
|
436
|
+
if (maxF === undefined || flow > maxF) {
|
|
437
|
+
maxF = flow;
|
|
438
|
+
}
|
|
439
|
+
})
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
const getMockData = (compartment) => {
|
|
444
|
+
if (compartment) {
|
|
445
|
+
const entry = fvData.compartments.find(
|
|
446
|
+
element => element.name === compartment);
|
|
447
|
+
if (!entry) return undefined;
|
|
448
|
+
calculateMinMax();
|
|
449
|
+
const vol = entry.volumes.find(v => v.time === 1.0).volume;
|
|
450
|
+
const flow = entry.flow;
|
|
451
|
+
const i = (vol - minVol) / (maxVol - minVol) * 9 + 1;
|
|
452
|
+
const e = (flow - minF) / (maxF - minF) * 9 + 1;
|
|
453
|
+
|
|
454
|
+
return { "Inspiration time": i, "Expiration time": e };
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
export {
|
|
459
|
+
getFlowAndVolume,
|
|
460
|
+
getMockData,
|
|
461
|
+
}
|
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
@pathway-selection-changed="onPathwaySelectionChanged"
|
|
42
42
|
@mapmanager-loaded="onMapmanagerLoaded"
|
|
43
43
|
:showPathwayFilter="false"
|
|
44
|
+
:tooltipContentProvider="tooltipPathLabelProvider"
|
|
44
45
|
@trackEvent="trackEvent"
|
|
45
46
|
/>
|
|
46
47
|
|
|
@@ -86,7 +87,7 @@ export default {
|
|
|
86
87
|
},
|
|
87
88
|
/**
|
|
88
89
|
* Perform a local search on this contentvuer
|
|
89
|
-
* This is similar to directly clicking
|
|
90
|
+
* This is similar to directly clicking on the map
|
|
90
91
|
*/
|
|
91
92
|
search: function (term) {
|
|
92
93
|
return this.$refs.flatmap.searchAndShowResult(term, true, true);
|
|
@@ -203,7 +204,9 @@ export default {
|
|
|
203
204
|
}
|
|
204
205
|
},
|
|
205
206
|
changeViewingMode: function (modeName) {
|
|
206
|
-
this.$refs.flatmap
|
|
207
|
+
if (this.$refs.flatmap) {
|
|
208
|
+
this.$refs.flatmap.changeViewingMode(modeName);
|
|
209
|
+
}
|
|
207
210
|
},
|
|
208
211
|
updateViewerSettings: function () {
|
|
209
212
|
const {
|
|
@@ -217,12 +220,14 @@ export default {
|
|
|
217
220
|
|
|
218
221
|
const currentFlatmap = this.$refs.flatmap;
|
|
219
222
|
|
|
220
|
-
currentFlatmap
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
223
|
+
if (currentFlatmap) {
|
|
224
|
+
currentFlatmap.changeViewingMode(viewingMode);
|
|
225
|
+
currentFlatmap.setFlightPath3D(flightPathDisplay);
|
|
226
|
+
currentFlatmap.setColour(organsDisplay);
|
|
227
|
+
currentFlatmap.setOutlines(outlinesDisplay);
|
|
228
|
+
currentFlatmap.backgroundChangeCallback(backgroundDisplay);
|
|
229
|
+
currentFlatmap.setConnectionType(connectionType);
|
|
230
|
+
}
|
|
226
231
|
},
|
|
227
232
|
setVisibilityFilter: function (payload) {
|
|
228
233
|
if (this?.alive) {
|
|
@@ -42,6 +42,7 @@
|
|
|
42
42
|
@open-pubmed-url="onOpenPubmedUrl"
|
|
43
43
|
@mapmanager-loaded="onMapmanagerLoaded"
|
|
44
44
|
:showPathwayFilter="false"
|
|
45
|
+
:tooltipContentProvider="tooltipPathLabelProvider"
|
|
45
46
|
@trackEvent="trackEvent"
|
|
46
47
|
/>
|
|
47
48
|
|
|
@@ -334,8 +335,10 @@ export default {
|
|
|
334
335
|
* Change the view mode of the current flatmap
|
|
335
336
|
*/
|
|
336
337
|
changeViewingMode: function (modeName) {
|
|
337
|
-
const flatmap = this.$refs.multiflatmap
|
|
338
|
-
flatmap
|
|
338
|
+
const flatmap = this.$refs.multiflatmap?.getCurrentFlatmap();
|
|
339
|
+
if (flatmap) {
|
|
340
|
+
flatmap.changeViewingMode(modeName);
|
|
341
|
+
}
|
|
339
342
|
},
|
|
340
343
|
showConnectivity: function (payload) {
|
|
341
344
|
if (this?.alive && this.flatmapReady && this.$refs.multiflatmap) {
|
|
@@ -386,12 +389,14 @@ export default {
|
|
|
386
389
|
if (this.flatmapReady) {
|
|
387
390
|
const currentFlatmap = this.$refs.multiflatmap.getCurrentFlatmap();
|
|
388
391
|
|
|
389
|
-
currentFlatmap
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
392
|
+
if (currentFlatmap) {
|
|
393
|
+
currentFlatmap.changeViewingMode(viewingMode);
|
|
394
|
+
currentFlatmap.setFlightPath3D(flightPathDisplay);
|
|
395
|
+
currentFlatmap.setColour(organsDisplay);
|
|
396
|
+
currentFlatmap.setOutlines(outlinesDisplay);
|
|
397
|
+
currentFlatmap.backgroundChangeCallback(backgroundDisplay);
|
|
398
|
+
currentFlatmap.setConnectionType(connectionType);
|
|
399
|
+
}
|
|
395
400
|
}
|
|
396
401
|
},
|
|
397
402
|
setVisibilityFilter: function (payload) {
|
package/src/components.d.ts
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
|
-
/* prettier-ignore */
|
|
3
2
|
// @ts-nocheck
|
|
3
|
+
// biome-ignore lint: disable
|
|
4
|
+
// oxlint-disable
|
|
5
|
+
// ------
|
|
4
6
|
// Generated by unplugin-vue-components
|
|
5
7
|
// Read more: https://github.com/vuejs/core/pull/3399
|
|
8
|
+
|
|
6
9
|
export {}
|
|
7
10
|
|
|
11
|
+
/* prettier-ignore */
|
|
8
12
|
declare module 'vue' {
|
|
9
13
|
export interface GlobalComponents {
|
|
10
14
|
CellDLViewer: typeof import('./components/viewers/CellDLViewer.vue')['default']
|
|
@@ -58,7 +62,7 @@ declare module 'vue' {
|
|
|
58
62
|
SplitDialog: typeof import('./components/SplitDialog.vue')['default']
|
|
59
63
|
SplitFlow: typeof import('./components/SplitFlow.vue')['default']
|
|
60
64
|
}
|
|
61
|
-
export interface
|
|
65
|
+
export interface GlobalDirectives {
|
|
62
66
|
vLoading: typeof import('element-plus/es')['ElLoadingDirective']
|
|
63
67
|
}
|
|
64
68
|
}
|
package/src/main.js
CHANGED
|
@@ -4,6 +4,7 @@ import { createPinia } from 'pinia'
|
|
|
4
4
|
import * as VueRouter from 'vue-router'
|
|
5
5
|
import App from './App.vue'
|
|
6
6
|
import { useMainStore } from './stores/index'
|
|
7
|
+
import './assets/fonts.scss'
|
|
7
8
|
|
|
8
9
|
const routes = [
|
|
9
10
|
{ path: '/' },
|
|
@@ -29,4 +30,4 @@ if (mainStore && token) {
|
|
|
29
30
|
mainStore.setUserToken(token.split("=")[1])
|
|
30
31
|
}
|
|
31
32
|
|
|
32
|
-
app.mount('#app')
|
|
33
|
+
app.mount('#app')
|
|
@@ -41,7 +41,23 @@ export default {
|
|
|
41
41
|
default: false,
|
|
42
42
|
},
|
|
43
43
|
},
|
|
44
|
-
inject:
|
|
44
|
+
inject: {
|
|
45
|
+
showGlobalSettings: {
|
|
46
|
+
default: true,
|
|
47
|
+
},
|
|
48
|
+
showOpenMapButton: {
|
|
49
|
+
default: true,
|
|
50
|
+
},
|
|
51
|
+
showLongLabel: {
|
|
52
|
+
default: true,
|
|
53
|
+
},
|
|
54
|
+
truncateLongLabel: {
|
|
55
|
+
default: true,
|
|
56
|
+
},
|
|
57
|
+
showIdInTooltip: {
|
|
58
|
+
default: true,
|
|
59
|
+
},
|
|
60
|
+
},
|
|
45
61
|
computed: {
|
|
46
62
|
...mapStores(useEntriesStore, useSettingsStore, useSplitFlowStore, useConnectivitiesStore),
|
|
47
63
|
idNamePair() {
|
|
@@ -776,6 +792,70 @@ export default {
|
|
|
776
792
|
trackEvent: function (data) {
|
|
777
793
|
Tagging.sendEvent(data);
|
|
778
794
|
},
|
|
795
|
+
/**
|
|
796
|
+
* Provides custom tooltip content for FlatmapVuer path features.
|
|
797
|
+
* Uses connectivity 'long-label' values for IDs starting with 'ilxtr:' or 'ilx:'.
|
|
798
|
+
* Returns null to use the default tooltip when long labels are disabled or unavailable.
|
|
799
|
+
*/
|
|
800
|
+
tooltipPathLabelProvider: function (featureData) {
|
|
801
|
+
const showLong = this.showLongLabel?.value ?? this.showLongLabel;
|
|
802
|
+
if (!showLong) {
|
|
803
|
+
return null;
|
|
804
|
+
}
|
|
805
|
+
|
|
806
|
+
// Handle both single feature data object and array of feature data (multi-feature case)
|
|
807
|
+
const features = Array.isArray(featureData) ? featureData : [featureData];
|
|
808
|
+
const longLabels = [];
|
|
809
|
+
const uuid = features[0]?.mapUUID;
|
|
810
|
+
const connectivities = uuid ? this.connectivitiesStore?.globalConnectivities?.[uuid] : null;
|
|
811
|
+
|
|
812
|
+
// Make features unique by it's id.
|
|
813
|
+
const uniqueFeatures = features.filter((feature, index, self) =>
|
|
814
|
+
index === self.findIndex((f) => f.id === feature.id)
|
|
815
|
+
);
|
|
816
|
+
|
|
817
|
+
for (const feature of uniqueFeatures) {
|
|
818
|
+
const featureId = feature?.id;
|
|
819
|
+
// Only applies to path features
|
|
820
|
+
if (!featureId || !(featureId.startsWith('ilxtr:') || featureId.startsWith('ilx:'))) {
|
|
821
|
+
continue;
|
|
822
|
+
}
|
|
823
|
+
// Look up long-label from the connectivity store
|
|
824
|
+
if (connectivities) {
|
|
825
|
+
const match = connectivities.find(c => c.id === featureId);
|
|
826
|
+
const truncate = this.truncateLongLabel?.value ?? this.truncateLongLabel;
|
|
827
|
+
const lineClamp = 3;
|
|
828
|
+
const withIdStyles = [
|
|
829
|
+
`margin-bottom: 4px`,
|
|
830
|
+
];
|
|
831
|
+
const truncateStyles = [
|
|
832
|
+
`display: -webkit-box`,
|
|
833
|
+
`-webkit-line-clamp: ${lineClamp}`,
|
|
834
|
+
`-webkit-box-orient: vertical`,
|
|
835
|
+
`overflow: hidden`,
|
|
836
|
+
];
|
|
837
|
+
const styles = [
|
|
838
|
+
...(this.showIdInTooltip ? withIdStyles : []),
|
|
839
|
+
...(truncate ? truncateStyles : [])
|
|
840
|
+
].join(';');
|
|
841
|
+
|
|
842
|
+
if (match && match['long-label']) {
|
|
843
|
+
let labelTag = []
|
|
844
|
+
labelTag.push(`<div style="${styles}">${capitalise(match['long-label'])}</div>`);
|
|
845
|
+
if (this.showIdInTooltip) {
|
|
846
|
+
labelTag.push(`<span class="id-tag">${featureId}</span>`);
|
|
847
|
+
}
|
|
848
|
+
longLabels.push(labelTag.join(''));
|
|
849
|
+
}
|
|
850
|
+
}
|
|
851
|
+
}
|
|
852
|
+
|
|
853
|
+
if (longLabels.length > 0) {
|
|
854
|
+
return `<div class='flatmap-feature-label flatmap-connectivity-label'>${longLabels.join('<hr/>')}</div>`;
|
|
855
|
+
}
|
|
856
|
+
|
|
857
|
+
return null; // Use default tooltip
|
|
858
|
+
},
|
|
779
859
|
},
|
|
780
860
|
data: function () {
|
|
781
861
|
return {
|