@abi-software/scaffoldvuer 0.2.1 → 0.2.2-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.
- package/CHANGELOG.md +12 -1
- package/dist/scaffoldvuer-wc.common.js +44 -22
- package/dist/scaffoldvuer-wc.umd.js +44 -22
- package/dist/scaffoldvuer-wc.umd.min.js +44 -22
- package/dist/scaffoldvuer.common.js +219 -102
- package/dist/scaffoldvuer.common.js.map +1 -1
- package/dist/scaffoldvuer.css +1 -1
- package/dist/scaffoldvuer.umd.js +219 -102
- package/dist/scaffoldvuer.umd.js.map +1 -1
- package/dist/scaffoldvuer.umd.min.js +1 -1
- package/dist/scaffoldvuer.umd.min.js.map +1 -1
- package/package-lock.json +4 -4
- package/package.json +2 -2
- package/src/App.vue +6 -0
- package/src/components/ScaffoldVuer.vue +309 -179
- package/src/components/TreeControls.vue +76 -38
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
id="organsDisplayArea"
|
|
20
20
|
ref="display"
|
|
21
21
|
tabindex="-1"
|
|
22
|
-
style="height:100%;width:100
|
|
22
|
+
style="height: 100%; width: 100%"
|
|
23
23
|
@keydown.66="backgroundChangeCallback"
|
|
24
24
|
/>
|
|
25
25
|
<div v-show="displayUI && !isTransitioning">
|
|
@@ -74,6 +74,7 @@
|
|
|
74
74
|
ref="treeControls"
|
|
75
75
|
v-popover:checkBoxPopover
|
|
76
76
|
:help-mode="helpMode"
|
|
77
|
+
:isReady="isReady"
|
|
77
78
|
:show-colour-picker="showColourPicker"
|
|
78
79
|
@object-selected="objectSelected"
|
|
79
80
|
@object-hovered="objectHovered"
|
|
@@ -96,7 +97,7 @@
|
|
|
96
97
|
v-if="sceneData.timeVarying"
|
|
97
98
|
v-popover:sliderPopover
|
|
98
99
|
class="time-slider-container"
|
|
99
|
-
:class="[
|
|
100
|
+
:class="[minimisedSlider ? 'minimised' : '', sliderPosition]"
|
|
100
101
|
>
|
|
101
102
|
<el-tabs type="card">
|
|
102
103
|
<el-tab-pane label="Animate scaffold">
|
|
@@ -116,7 +117,7 @@
|
|
|
116
117
|
<el-slider
|
|
117
118
|
:min="0"
|
|
118
119
|
:max="timeMax"
|
|
119
|
-
:value="sceneData.currentTime / 100 * timeMax"
|
|
120
|
+
:value="(sceneData.currentTime / 100) * timeMax"
|
|
120
121
|
:step="0.1"
|
|
121
122
|
tooltip-class="time-slider-tooltip"
|
|
122
123
|
class="slider"
|
|
@@ -206,7 +207,7 @@
|
|
|
206
207
|
>
|
|
207
208
|
<div>
|
|
208
209
|
Fit to
|
|
209
|
-
<br
|
|
210
|
+
<br />
|
|
210
211
|
window
|
|
211
212
|
</div>
|
|
212
213
|
<map-svg-icon
|
|
@@ -219,6 +220,42 @@
|
|
|
219
220
|
/>
|
|
220
221
|
</el-popover>
|
|
221
222
|
</div>
|
|
223
|
+
<el-popover
|
|
224
|
+
ref="open-map-popover"
|
|
225
|
+
placement="top-start"
|
|
226
|
+
width="128"
|
|
227
|
+
:append-to-body="false"
|
|
228
|
+
trigger="click"
|
|
229
|
+
popper-class="open-map-popper non-selectable"
|
|
230
|
+
>
|
|
231
|
+
<el-row>
|
|
232
|
+
<el-button
|
|
233
|
+
type="primary"
|
|
234
|
+
plain
|
|
235
|
+
@click="$emit('open-map', 'AC')"
|
|
236
|
+
>
|
|
237
|
+
Open AC Map
|
|
238
|
+
</el-button>
|
|
239
|
+
</el-row>
|
|
240
|
+
<el-row>
|
|
241
|
+
<el-button
|
|
242
|
+
type="primary"
|
|
243
|
+
plain
|
|
244
|
+
@click="$emit('open-map', 'FC')"
|
|
245
|
+
>
|
|
246
|
+
Open FC Map
|
|
247
|
+
</el-button>
|
|
248
|
+
</el-row>
|
|
249
|
+
<el-row>
|
|
250
|
+
<el-button
|
|
251
|
+
type="primary"
|
|
252
|
+
plain
|
|
253
|
+
@click="$emit('open-map', '3D')"
|
|
254
|
+
>
|
|
255
|
+
Open 3D Map
|
|
256
|
+
</el-button>
|
|
257
|
+
</el-row>
|
|
258
|
+
</el-popover>
|
|
222
259
|
<el-popover
|
|
223
260
|
ref="backgroundPopover"
|
|
224
261
|
placement="top-start"
|
|
@@ -227,36 +264,64 @@
|
|
|
227
264
|
trigger="click"
|
|
228
265
|
popper-class="background-popper non-selectable"
|
|
229
266
|
>
|
|
230
|
-
<el-row class="backgroundText">
|
|
231
|
-
Change background
|
|
232
|
-
</el-row>
|
|
267
|
+
<el-row class="backgroundText"> Change background </el-row>
|
|
233
268
|
<el-row class="backgroundChooser">
|
|
234
269
|
<div
|
|
235
270
|
v-for="item in availableBackground"
|
|
236
271
|
:key="item"
|
|
237
|
-
:class="[
|
|
272
|
+
:class="[
|
|
273
|
+
'backgroundChoice',
|
|
274
|
+
item,
|
|
275
|
+
item == currentBackground ? 'active' : '',
|
|
276
|
+
]"
|
|
238
277
|
@click="backgroundChangeCallback(item)"
|
|
239
278
|
/>
|
|
240
279
|
</el-row>
|
|
241
280
|
</el-popover>
|
|
242
|
-
<
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
placement="right"
|
|
246
|
-
:append-to-body="false"
|
|
247
|
-
trigger="manual"
|
|
248
|
-
popper-class="scaffold-popper right-popper non-selectable"
|
|
281
|
+
<div
|
|
282
|
+
class="settings-group"
|
|
283
|
+
:class="{ open: drawerOpen, close: !drawerOpen }"
|
|
249
284
|
>
|
|
250
|
-
<
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
285
|
+
<el-row>
|
|
286
|
+
<el-popover
|
|
287
|
+
v-model="hoverVisibilities[8].value"
|
|
288
|
+
content="Open new map"
|
|
289
|
+
placement="right"
|
|
290
|
+
:append-to-body="false"
|
|
291
|
+
trigger="manual"
|
|
292
|
+
popper-class="scaffold-popper right-popper non-selectable"
|
|
293
|
+
>
|
|
294
|
+
<map-svg-icon
|
|
295
|
+
v-if="enableOpenMapUI"
|
|
296
|
+
slot="reference"
|
|
297
|
+
v-popover:open-map-popover
|
|
298
|
+
icon="openMap"
|
|
299
|
+
class="icon-button"
|
|
300
|
+
@mouseover.native="showHelpText(8)"
|
|
301
|
+
@mouseout.native="hideHelpText(8)"
|
|
302
|
+
/>
|
|
303
|
+
</el-popover>
|
|
304
|
+
</el-row>
|
|
305
|
+
<el-row>
|
|
306
|
+
<el-popover
|
|
307
|
+
v-model="hoverVisibilities[3].value"
|
|
308
|
+
content="Change background color"
|
|
309
|
+
placement="right"
|
|
310
|
+
:append-to-body="false"
|
|
311
|
+
trigger="manual"
|
|
312
|
+
popper-class="scaffold-popper right-popper non-selectable"
|
|
313
|
+
>
|
|
314
|
+
<map-svg-icon
|
|
315
|
+
slot="reference"
|
|
316
|
+
v-popover:backgroundPopover
|
|
317
|
+
icon="changeBckgd"
|
|
318
|
+
class="icon-button"
|
|
319
|
+
@mouseover.native="showHelpText(3)"
|
|
320
|
+
@mouseout.native="hideHelpText(3)"
|
|
321
|
+
/>
|
|
322
|
+
</el-popover>
|
|
323
|
+
</el-row>
|
|
324
|
+
</div>
|
|
260
325
|
</div>
|
|
261
326
|
</div>
|
|
262
327
|
</template>
|
|
@@ -271,6 +336,7 @@ import { MapSvgIcon, MapSvgSpriteColor } from "@abi-software/svg-sprite";
|
|
|
271
336
|
import { findObjectsWithNames, getAllObjects } from "../scripts/utilities.js";
|
|
272
337
|
import { SearchIndex } from "../scripts/search.js";
|
|
273
338
|
import {
|
|
339
|
+
Button,
|
|
274
340
|
Col,
|
|
275
341
|
Loading,
|
|
276
342
|
Option,
|
|
@@ -279,12 +345,13 @@ import {
|
|
|
279
345
|
Select,
|
|
280
346
|
Slider,
|
|
281
347
|
TabPane,
|
|
282
|
-
Tabs
|
|
348
|
+
Tabs,
|
|
283
349
|
} from "element-ui";
|
|
284
350
|
import lang from "element-ui/lib/locale/lang/en";
|
|
285
351
|
import locale from "element-ui/lib/locale";
|
|
286
352
|
|
|
287
353
|
locale.use(lang);
|
|
354
|
+
Vue.use(Button);
|
|
288
355
|
Vue.use(Col);
|
|
289
356
|
Vue.use(Loading.directive);
|
|
290
357
|
Vue.use(Option);
|
|
@@ -322,21 +389,21 @@ export default {
|
|
|
322
389
|
*/
|
|
323
390
|
url: {
|
|
324
391
|
type: String,
|
|
325
|
-
default: ""
|
|
392
|
+
default: "",
|
|
326
393
|
},
|
|
327
394
|
/**
|
|
328
395
|
* Show the colour control of set to true.
|
|
329
396
|
*/
|
|
330
397
|
showColourPicker: {
|
|
331
398
|
type: Boolean,
|
|
332
|
-
default: false
|
|
399
|
+
default: false,
|
|
333
400
|
},
|
|
334
401
|
/**
|
|
335
402
|
* Flag to show/hide the UI.
|
|
336
403
|
*/
|
|
337
404
|
displayUI: {
|
|
338
405
|
type: Boolean,
|
|
339
|
-
default: true
|
|
406
|
+
default: true,
|
|
340
407
|
},
|
|
341
408
|
/**
|
|
342
409
|
* Display all graphics at start.
|
|
@@ -345,21 +412,21 @@ export default {
|
|
|
345
412
|
*/
|
|
346
413
|
displayAtStartUp: {
|
|
347
414
|
type: Boolean,
|
|
348
|
-
default: true
|
|
415
|
+
default: true,
|
|
349
416
|
},
|
|
350
417
|
/**
|
|
351
418
|
* Use for toggling the help tooltips.
|
|
352
419
|
*/
|
|
353
420
|
helpMode: {
|
|
354
421
|
type: Boolean,
|
|
355
|
-
default: false
|
|
422
|
+
default: false,
|
|
356
423
|
},
|
|
357
424
|
/**
|
|
358
425
|
* Use for show/display beta warning icon.
|
|
359
426
|
*/
|
|
360
427
|
displayWarning: {
|
|
361
428
|
type: Boolean,
|
|
362
|
-
default: true
|
|
429
|
+
default: true,
|
|
363
430
|
},
|
|
364
431
|
/**
|
|
365
432
|
* Warning message for the hovered over text
|
|
@@ -367,7 +434,7 @@ export default {
|
|
|
367
434
|
*/
|
|
368
435
|
warningMessage: {
|
|
369
436
|
type: String,
|
|
370
|
-
default: "Beta feature - under active development"
|
|
437
|
+
default: "Beta feature - under active development",
|
|
371
438
|
},
|
|
372
439
|
displayLatestChanges: {
|
|
373
440
|
type: Boolean,
|
|
@@ -382,43 +449,51 @@ export default {
|
|
|
382
449
|
*/
|
|
383
450
|
displayMarkers: {
|
|
384
451
|
type: Boolean,
|
|
385
|
-
default: false
|
|
452
|
+
default: false,
|
|
386
453
|
},
|
|
387
454
|
/**
|
|
388
455
|
* Show/hide minimap.
|
|
389
456
|
*/
|
|
390
457
|
displayMinimap: {
|
|
391
458
|
type: Boolean,
|
|
392
|
-
default: false
|
|
459
|
+
default: false,
|
|
393
460
|
},
|
|
394
461
|
/**
|
|
395
462
|
* Format of the input URL
|
|
396
463
|
*/
|
|
397
464
|
format: {
|
|
398
465
|
type: String,
|
|
399
|
-
default: "metadata"
|
|
466
|
+
default: "metadata",
|
|
400
467
|
},
|
|
401
468
|
/**
|
|
402
469
|
* Settings for minimap position, size and alignment.
|
|
403
470
|
*/
|
|
404
471
|
minimapSettings: {
|
|
405
472
|
type: Object,
|
|
406
|
-
default: function() {
|
|
473
|
+
default: function () {
|
|
407
474
|
return {
|
|
408
475
|
x_offset: 16,
|
|
409
476
|
y_offset: 16,
|
|
410
477
|
width: 128,
|
|
411
478
|
height: 128,
|
|
412
|
-
align: "top-right"
|
|
479
|
+
align: "top-right",
|
|
413
480
|
};
|
|
414
|
-
}
|
|
481
|
+
},
|
|
482
|
+
},
|
|
483
|
+
/**
|
|
484
|
+
* Flag to determine rather open map UI should be
|
|
485
|
+
* presented or not.
|
|
486
|
+
*/
|
|
487
|
+
enableOpenMapUI: {
|
|
488
|
+
type: Boolean,
|
|
489
|
+
default: false,
|
|
415
490
|
},
|
|
416
491
|
/**
|
|
417
492
|
* State containing state of the scaffold.
|
|
418
493
|
*/
|
|
419
494
|
state: {
|
|
420
495
|
type: Object,
|
|
421
|
-
default: undefined
|
|
496
|
+
default: undefined,
|
|
422
497
|
},
|
|
423
498
|
/**
|
|
424
499
|
* Optional prop for the name of the region to focus on,
|
|
@@ -426,7 +501,7 @@ export default {
|
|
|
426
501
|
*/
|
|
427
502
|
region: {
|
|
428
503
|
type: String,
|
|
429
|
-
default: ""
|
|
504
|
+
default: "",
|
|
430
505
|
},
|
|
431
506
|
/**
|
|
432
507
|
* Optional prop for an URL of containing information of a viewport.
|
|
@@ -435,20 +510,21 @@ export default {
|
|
|
435
510
|
*/
|
|
436
511
|
viewURL: {
|
|
437
512
|
type: String,
|
|
438
|
-
default: ""
|
|
513
|
+
default: "",
|
|
439
514
|
},
|
|
440
515
|
/**
|
|
441
516
|
* Settings for turning on/off rendering
|
|
442
517
|
*/
|
|
443
518
|
render: {
|
|
444
519
|
type: Boolean,
|
|
445
|
-
default: true
|
|
446
|
-
}
|
|
520
|
+
default: true,
|
|
521
|
+
},
|
|
447
522
|
},
|
|
448
|
-
data: function() {
|
|
523
|
+
data: function () {
|
|
449
524
|
return {
|
|
450
525
|
sceneData: this.$module.sceneData,
|
|
451
526
|
isPlaying: false,
|
|
527
|
+
isReady: false,
|
|
452
528
|
/**
|
|
453
529
|
* This is set when scene is transitioning.
|
|
454
530
|
*/
|
|
@@ -463,6 +539,7 @@ export default {
|
|
|
463
539
|
{ value: false },
|
|
464
540
|
{ value: false },
|
|
465
541
|
{ value: false },
|
|
542
|
+
{ value: false },
|
|
466
543
|
],
|
|
467
544
|
inHelp: false,
|
|
468
545
|
loading: false,
|
|
@@ -478,28 +555,28 @@ export default {
|
|
|
478
555
|
playSpeed: [
|
|
479
556
|
{
|
|
480
557
|
value: 0.1,
|
|
481
|
-
label: "0.1x"
|
|
558
|
+
label: "0.1x",
|
|
482
559
|
},
|
|
483
560
|
{
|
|
484
561
|
value: 0.5,
|
|
485
|
-
label: "0.5x"
|
|
562
|
+
label: "0.5x",
|
|
486
563
|
},
|
|
487
564
|
{
|
|
488
565
|
value: 1,
|
|
489
|
-
label: "1x"
|
|
566
|
+
label: "1x",
|
|
490
567
|
},
|
|
491
568
|
{
|
|
492
569
|
value: 2,
|
|
493
|
-
label: "2x"
|
|
570
|
+
label: "2x",
|
|
494
571
|
},
|
|
495
572
|
{
|
|
496
573
|
value: 5,
|
|
497
|
-
label: "5x"
|
|
574
|
+
label: "5x",
|
|
498
575
|
},
|
|
499
576
|
{
|
|
500
577
|
value: 10,
|
|
501
|
-
label: "10x"
|
|
502
|
-
}
|
|
578
|
+
label: "10x",
|
|
579
|
+
},
|
|
503
580
|
],
|
|
504
581
|
currentSpeed: 1,
|
|
505
582
|
timeStamps: {},
|
|
@@ -511,54 +588,54 @@ export default {
|
|
|
511
588
|
x: 200,
|
|
512
589
|
y: 200,
|
|
513
590
|
},
|
|
514
|
-
fileFormat: "metadata"
|
|
591
|
+
fileFormat: "metadata",
|
|
515
592
|
};
|
|
516
593
|
},
|
|
517
594
|
watch: {
|
|
518
595
|
format: {
|
|
519
|
-
handler: function(value) {
|
|
596
|
+
handler: function (value) {
|
|
520
597
|
this.fileFormat = value;
|
|
521
598
|
},
|
|
522
|
-
immediate: true
|
|
599
|
+
immediate: true,
|
|
523
600
|
},
|
|
524
601
|
url: {
|
|
525
|
-
handler: function(newValue) {
|
|
602
|
+
handler: function (newValue) {
|
|
526
603
|
if (this.state === undefined || this.state.url === undefined)
|
|
527
604
|
this.setURL(newValue);
|
|
528
605
|
},
|
|
529
|
-
immediate: true
|
|
606
|
+
immediate: true,
|
|
530
607
|
},
|
|
531
608
|
region: {
|
|
532
|
-
handler: function(region) {
|
|
609
|
+
handler: function (region) {
|
|
533
610
|
if (!(this.state || this.viewURL)) this.setFocusedRegion(region);
|
|
534
611
|
},
|
|
535
|
-
immediate: true
|
|
612
|
+
immediate: true,
|
|
536
613
|
},
|
|
537
614
|
state: {
|
|
538
|
-
handler: function(state) {
|
|
615
|
+
handler: function (state) {
|
|
539
616
|
this.setState(state);
|
|
540
617
|
},
|
|
541
618
|
immediate: true,
|
|
542
|
-
deep: true
|
|
619
|
+
deep: true,
|
|
543
620
|
},
|
|
544
621
|
viewURL: {
|
|
545
|
-
handler: function(viewURL) {
|
|
622
|
+
handler: function (viewURL) {
|
|
546
623
|
this.updateViewURL(viewURL);
|
|
547
624
|
},
|
|
548
|
-
immediate: true
|
|
625
|
+
immediate: true,
|
|
549
626
|
},
|
|
550
|
-
helpMode: function(val) {
|
|
627
|
+
helpMode: function (val) {
|
|
551
628
|
this.setHelpMode(val);
|
|
552
629
|
},
|
|
553
|
-
displayMarkers: function(val) {
|
|
630
|
+
displayMarkers: function (val) {
|
|
554
631
|
this.$module.scene.displayMarkers = val;
|
|
555
632
|
//Update pickable objects
|
|
556
633
|
this.$module.scene.forcePickableObjectsUpdate = true;
|
|
557
634
|
},
|
|
558
|
-
displayMinimap: function(val) {
|
|
635
|
+
displayMinimap: function (val) {
|
|
559
636
|
this.$module.scene.displayMinimap = val;
|
|
560
637
|
},
|
|
561
|
-
"sceneData.currentTime": function() {
|
|
638
|
+
"sceneData.currentTime": function () {
|
|
562
639
|
/**
|
|
563
640
|
* Triggers when scene time changes.
|
|
564
641
|
*
|
|
@@ -567,29 +644,28 @@ export default {
|
|
|
567
644
|
*/
|
|
568
645
|
this.$emit("timeChanged", this.sceneData.currentTime);
|
|
569
646
|
},
|
|
570
|
-
duration: function() {
|
|
647
|
+
duration: function () {
|
|
571
648
|
this.$module.scene.setDuration(this.duration);
|
|
572
649
|
},
|
|
573
650
|
minimapSettings: {
|
|
574
651
|
deep: true,
|
|
575
|
-
handler: "updateMinimapScissor"
|
|
652
|
+
handler: "updateMinimapScissor",
|
|
576
653
|
},
|
|
577
|
-
render: function(val) {
|
|
654
|
+
render: function (val) {
|
|
578
655
|
this.toggleRendering(val);
|
|
579
|
-
}
|
|
656
|
+
},
|
|
580
657
|
},
|
|
581
|
-
beforeCreate: function() {
|
|
658
|
+
beforeCreate: function () {
|
|
582
659
|
this.$module = new OrgansViewer();
|
|
583
|
-
this.isReady = false;
|
|
584
660
|
this.selectedObjects = [];
|
|
585
661
|
this.hoveredObjects = [];
|
|
586
662
|
this.currentBackground = "white";
|
|
587
663
|
this._currentURL = undefined;
|
|
588
664
|
this.availableBackground = ["white", "black", "lightskyblue"];
|
|
589
|
-
this.$_searchIndex = new SearchIndex()
|
|
665
|
+
this.$_searchIndex = new SearchIndex();
|
|
590
666
|
this.$_tempId = 1;
|
|
591
667
|
},
|
|
592
|
-
mounted: function() {
|
|
668
|
+
mounted: function () {
|
|
593
669
|
this.$refs.treeControls.setModule(this.$module);
|
|
594
670
|
let eventNotifier = new EventNotifier();
|
|
595
671
|
eventNotifier.subscribe(this, this.eventNotifierCallback);
|
|
@@ -602,7 +678,7 @@ export default {
|
|
|
602
678
|
);
|
|
603
679
|
this.defaultRate = this.$module.getPlayRate();
|
|
604
680
|
},
|
|
605
|
-
beforeDestroy: function() {
|
|
681
|
+
beforeDestroy: function () {
|
|
606
682
|
if (this.ro) this.ro.disconnect();
|
|
607
683
|
this.$module.destroy();
|
|
608
684
|
this.$module = undefined;
|
|
@@ -611,7 +687,7 @@ export default {
|
|
|
611
687
|
/**
|
|
612
688
|
* This is called when a new zinc object is read into the scene.
|
|
613
689
|
*/
|
|
614
|
-
zincObjectAdded: function(zincObject) {
|
|
690
|
+
zincObjectAdded: function (zincObject) {
|
|
615
691
|
this.loading = false;
|
|
616
692
|
zincObject.searchIndexId = ++this.$_tempId;
|
|
617
693
|
this.$_searchIndex.addZincObject(zincObject, zincObject.searchIndexId);
|
|
@@ -623,7 +699,7 @@ export default {
|
|
|
623
699
|
* to one of the three preset colour: white, black and
|
|
624
700
|
* lightskyblue.
|
|
625
701
|
*/
|
|
626
|
-
backgroundChangeCallback: function(colour) {
|
|
702
|
+
backgroundChangeCallback: function (colour) {
|
|
627
703
|
this.currentBackground = colour;
|
|
628
704
|
this.$module.zincRenderer
|
|
629
705
|
.getThreeJSRenderer()
|
|
@@ -633,7 +709,7 @@ export default {
|
|
|
633
709
|
* This is called by captueeScreenshot and after the last render
|
|
634
710
|
* loop, it download a screenshot of the current scene with no UI.
|
|
635
711
|
*/
|
|
636
|
-
captureScreenshotCallback: function() {
|
|
712
|
+
captureScreenshotCallback: function () {
|
|
637
713
|
//Remove the callback, only needs to happen once
|
|
638
714
|
this.$module.zincRenderer.removePostRenderCallbackFunction(
|
|
639
715
|
this.captureID
|
|
@@ -656,7 +732,7 @@ export default {
|
|
|
656
732
|
*
|
|
657
733
|
* @public
|
|
658
734
|
*/
|
|
659
|
-
captureScreenshot: function(filename) {
|
|
735
|
+
captureScreenshot: function (filename) {
|
|
660
736
|
this.captureFilename = filename;
|
|
661
737
|
this.captureID = this.$module.zincRenderer.addPostRenderCallbackFunction(
|
|
662
738
|
this.captureScreenshotCallback
|
|
@@ -678,7 +754,7 @@ export default {
|
|
|
678
754
|
*
|
|
679
755
|
* @public
|
|
680
756
|
*/
|
|
681
|
-
fitWindow: function() {
|
|
757
|
+
fitWindow: function () {
|
|
682
758
|
if (this.$module.scene) {
|
|
683
759
|
this.$module.scene.viewAll();
|
|
684
760
|
}
|
|
@@ -689,7 +765,7 @@ export default {
|
|
|
689
765
|
*
|
|
690
766
|
* @public
|
|
691
767
|
*/
|
|
692
|
-
zoomIn: function() {
|
|
768
|
+
zoomIn: function () {
|
|
693
769
|
if (this.$module.scene) {
|
|
694
770
|
this.$module.scene.changeZoomByScrollRateUnit(-1);
|
|
695
771
|
}
|
|
@@ -700,7 +776,7 @@ export default {
|
|
|
700
776
|
*
|
|
701
777
|
* @public
|
|
702
778
|
*/
|
|
703
|
-
zoomOut: function() {
|
|
779
|
+
zoomOut: function () {
|
|
704
780
|
if (this.$module.scene) {
|
|
705
781
|
this.$module.scene.changeZoomByScrollRateUnit(1);
|
|
706
782
|
}
|
|
@@ -710,7 +786,7 @@ export default {
|
|
|
710
786
|
*
|
|
711
787
|
* @public
|
|
712
788
|
*/
|
|
713
|
-
speedChanged: function(speed) {
|
|
789
|
+
speedChanged: function (speed) {
|
|
714
790
|
this.currentSpeed = speed;
|
|
715
791
|
this.$module.setPlayRate(this.defaultRate * this.currentSpeed);
|
|
716
792
|
},
|
|
@@ -719,12 +795,12 @@ export default {
|
|
|
719
795
|
*
|
|
720
796
|
* @public
|
|
721
797
|
*/
|
|
722
|
-
stopFreeSpin: function() {
|
|
798
|
+
stopFreeSpin: function () {
|
|
723
799
|
let cameracontrol = this.$module.scene.getZincCameraControls();
|
|
724
800
|
cameracontrol.stopAutoTumble();
|
|
725
801
|
this.isTransitioning = false;
|
|
726
802
|
},
|
|
727
|
-
findObjectsWithGroupName: function(name) {
|
|
803
|
+
findObjectsWithGroupName: function (name) {
|
|
728
804
|
let objects = [];
|
|
729
805
|
if (name && name != "" && this.$module.scene) {
|
|
730
806
|
objects = this.$module.scene.findObjectsWithGroupName(name);
|
|
@@ -734,7 +810,7 @@ export default {
|
|
|
734
810
|
/**
|
|
735
811
|
* Focus on named region
|
|
736
812
|
*/
|
|
737
|
-
viewRegion: function(names) {
|
|
813
|
+
viewRegion: function (names) {
|
|
738
814
|
const rootRegion = this.$module.scene.getRootRegion();
|
|
739
815
|
const groups = Array.isArray(names) ? names : [names];
|
|
740
816
|
const objects = findObjectsWithNames(rootRegion, groups, "", true);
|
|
@@ -743,7 +819,8 @@ export default {
|
|
|
743
819
|
if (this.$module.isSyncControl()) {
|
|
744
820
|
this.$module.setSyncControlZoomToBox(box);
|
|
745
821
|
} else {
|
|
746
|
-
const dist =
|
|
822
|
+
const dist =
|
|
823
|
+
this.$module.scene.camera.far - this.$module.scene.camera.near;
|
|
747
824
|
this.$module.scene.viewAllWithBoundingBox(box);
|
|
748
825
|
this.$module.scene.camera.far = this.$module.scene.camera.near + dist;
|
|
749
826
|
this.$module.scene.camera.updateProjectionMatrix();
|
|
@@ -752,7 +829,7 @@ export default {
|
|
|
752
829
|
}
|
|
753
830
|
return false;
|
|
754
831
|
},
|
|
755
|
-
setFocusedRegion: function(name) {
|
|
832
|
+
setFocusedRegion: function (name) {
|
|
756
833
|
if (name) {
|
|
757
834
|
if (this.isReady) {
|
|
758
835
|
this.viewRegion(name);
|
|
@@ -763,7 +840,7 @@ export default {
|
|
|
763
840
|
}
|
|
764
841
|
}
|
|
765
842
|
},
|
|
766
|
-
updateViewURL: function(viewURL) {
|
|
843
|
+
updateViewURL: function (viewURL) {
|
|
767
844
|
if (viewURL) {
|
|
768
845
|
if (this.isReady) {
|
|
769
846
|
const url = new URL(viewURL, this.url);
|
|
@@ -775,7 +852,7 @@ export default {
|
|
|
775
852
|
}
|
|
776
853
|
}
|
|
777
854
|
},
|
|
778
|
-
getRendererInfo: function() {
|
|
855
|
+
getRendererInfo: function () {
|
|
779
856
|
if (this.$module.zincRenderer) {
|
|
780
857
|
return this.$module.zincRenderer.getThreeJSRenderer().info;
|
|
781
858
|
}
|
|
@@ -787,7 +864,7 @@ export default {
|
|
|
787
864
|
*
|
|
788
865
|
* @public
|
|
789
866
|
*/
|
|
790
|
-
freeSpin: function() {
|
|
867
|
+
freeSpin: function () {
|
|
791
868
|
if (this.$module.scene) {
|
|
792
869
|
let cameracontrol = this.$module.scene.getZincCameraControls();
|
|
793
870
|
this.isTransitioning = true;
|
|
@@ -799,14 +876,14 @@ export default {
|
|
|
799
876
|
/**
|
|
800
877
|
* Callback when a region is selected/highlighted.
|
|
801
878
|
* It will also update other controls.
|
|
802
|
-
*
|
|
879
|
+
*
|
|
803
880
|
*/
|
|
804
|
-
eventNotifierCallback: function(event) {
|
|
881
|
+
eventNotifierCallback: function (event) {
|
|
805
882
|
const names = [];
|
|
806
883
|
let zincObjects = [];
|
|
807
884
|
const region = undefined;
|
|
808
885
|
if (event.eventType == 1 || event.eventType == 2) {
|
|
809
|
-
event.identifiers.forEach(identifier => {
|
|
886
|
+
event.identifiers.forEach((identifier) => {
|
|
810
887
|
if (identifier) {
|
|
811
888
|
let id = identifier.data.id
|
|
812
889
|
? identifier.data.id
|
|
@@ -836,7 +913,7 @@ export default {
|
|
|
836
913
|
} else if (event.eventType == 2) {
|
|
837
914
|
if (this.selectedObjects.length === 0) {
|
|
838
915
|
this.hideRegionTooltip();
|
|
839
|
-
|
|
916
|
+
// const offsets = this.$refs.scaffoldContainer.getBoundingClientRect();
|
|
840
917
|
if (this.$refs.treeControls) {
|
|
841
918
|
if (names.length > 0) {
|
|
842
919
|
//this.$refs.treeControls.changeHoverByNames(names, region, false);
|
|
@@ -845,7 +922,7 @@ export default {
|
|
|
845
922
|
this.$refs.treeControls.removeHover(true);
|
|
846
923
|
}
|
|
847
924
|
}
|
|
848
|
-
if (
|
|
925
|
+
if (event.identifiers.length > 0 && event.identifiers[0]) {
|
|
849
926
|
let id = event.identifiers[0].data.id
|
|
850
927
|
? event.identifiers[0].data.id
|
|
851
928
|
: event.identifiers[0].data.group;
|
|
@@ -854,19 +931,20 @@ export default {
|
|
|
854
931
|
this.tData.label = id;
|
|
855
932
|
if (event.identifiers[0].data.region)
|
|
856
933
|
this.tData.region = event.identifiers[0].data.region;
|
|
857
|
-
else
|
|
858
|
-
this.tData.region = "Root";
|
|
934
|
+
else this.tData.region = "Root";
|
|
859
935
|
this.tData.x = event.identifiers[0].coords.x;
|
|
860
|
-
this.tData.y
|
|
936
|
+
this.tData.y = event.identifiers[0].coords.y;
|
|
861
937
|
}
|
|
862
938
|
}
|
|
863
939
|
// Triggers when an object has been highlighted
|
|
864
940
|
this.$emit("scaffold-highlighted", event.identifiers);
|
|
865
941
|
}
|
|
866
|
-
} else if (event.eventType == 3)
|
|
867
|
-
|
|
942
|
+
} else if (event.eventType == 3) {
|
|
943
|
+
//MOVE
|
|
944
|
+
if (event.identifiers.length > 0 && event.identifiers[0]) {
|
|
868
945
|
if (event.identifiers[0].coords) {
|
|
869
|
-
const offsets =
|
|
946
|
+
const offsets =
|
|
947
|
+
this.$refs.scaffoldContainer.getBoundingClientRect();
|
|
870
948
|
this.tData.x = event.identifiers[0].coords.x - offsets.left;
|
|
871
949
|
this.tData.y = event.identifiers[0].coords.y - offsets.top;
|
|
872
950
|
}
|
|
@@ -878,7 +956,7 @@ export default {
|
|
|
878
956
|
*
|
|
879
957
|
* @public
|
|
880
958
|
*/
|
|
881
|
-
getCoordinatesOfSelected: function() {
|
|
959
|
+
getCoordinatesOfSelected: function () {
|
|
882
960
|
if (this.selectedObjects && this.selectedObjects.length > 0) {
|
|
883
961
|
return this.$module.scene.getObjectsScreenXY(this.selectedObjects);
|
|
884
962
|
}
|
|
@@ -891,13 +969,13 @@ export default {
|
|
|
891
969
|
*
|
|
892
970
|
* @public
|
|
893
971
|
*/
|
|
894
|
-
getDynamicSelectedCoordinates: function() {
|
|
972
|
+
getDynamicSelectedCoordinates: function () {
|
|
895
973
|
return this.$module.selectedScreenCoordinates;
|
|
896
974
|
},
|
|
897
975
|
/**
|
|
898
976
|
* Callback when time is changed through the UI.
|
|
899
977
|
*/
|
|
900
|
-
timeChange: function(event) {
|
|
978
|
+
timeChange: function (event) {
|
|
901
979
|
let normalizedTime = (event / this.timeMax) * 100;
|
|
902
980
|
if (normalizedTime != this.sceneData.currentTime)
|
|
903
981
|
this.$module.updateTime(normalizedTime);
|
|
@@ -907,7 +985,7 @@ export default {
|
|
|
907
985
|
*
|
|
908
986
|
* @param {object} object Zinc object
|
|
909
987
|
*/
|
|
910
|
-
objectSelected: function(objects, propagate) {
|
|
988
|
+
objectSelected: function (objects, propagate) {
|
|
911
989
|
this.selectedObjects = objects;
|
|
912
990
|
if (this.selectedObjects && this.selectedObjects.length > 0)
|
|
913
991
|
this.$refs.opacityControl.setObject(this.selectedObjects[0]);
|
|
@@ -918,7 +996,7 @@ export default {
|
|
|
918
996
|
*
|
|
919
997
|
* @param {object} object Zinc object
|
|
920
998
|
*/
|
|
921
|
-
objectHovered: function(objects, propagate) {
|
|
999
|
+
objectHovered: function (objects, propagate) {
|
|
922
1000
|
this.hoveredObjects = objects;
|
|
923
1001
|
this.$module.setHighlightedByZincObjects(objects, undefined, propagate);
|
|
924
1002
|
},
|
|
@@ -927,14 +1005,13 @@ export default {
|
|
|
927
1005
|
*
|
|
928
1006
|
* @param {} name Name of the group
|
|
929
1007
|
*/
|
|
930
|
-
changeActiveByName: function(names, region, propagate) {
|
|
1008
|
+
changeActiveByName: function (names, region, propagate) {
|
|
931
1009
|
const isArray = Array.isArray(names);
|
|
932
1010
|
if (names === undefined || (isArray && names.length === 0)) {
|
|
933
1011
|
this.$refs.treeControls.removeActive(propagate);
|
|
934
1012
|
} else {
|
|
935
1013
|
let array = names;
|
|
936
|
-
if (!isArray)
|
|
937
|
-
array = [array];
|
|
1014
|
+
if (!isArray) array = [array];
|
|
938
1015
|
this.$refs.treeControls.changeActiveByNames(array, region, propagate);
|
|
939
1016
|
}
|
|
940
1017
|
},
|
|
@@ -943,14 +1020,13 @@ export default {
|
|
|
943
1020
|
*
|
|
944
1021
|
* @param {name} name Name of the group
|
|
945
1022
|
*/
|
|
946
|
-
changeHighlightedByName: function(names, region, propagate) {
|
|
1023
|
+
changeHighlightedByName: function (names, region, propagate) {
|
|
947
1024
|
const isArray = Array.isArray(names);
|
|
948
1025
|
if (names === undefined || (isArray && names.length === 0)) {
|
|
949
1026
|
this.$refs.treeControls.removeHover(propagate);
|
|
950
1027
|
} else {
|
|
951
1028
|
let array = names;
|
|
952
|
-
if (!isArray)
|
|
953
|
-
array = [array];
|
|
1029
|
+
if (!isArray) array = [array];
|
|
954
1030
|
this.$refs.treeControls.changeHoverByNames(array, region, propagate);
|
|
955
1031
|
}
|
|
956
1032
|
},
|
|
@@ -959,7 +1035,7 @@ export default {
|
|
|
959
1035
|
*
|
|
960
1036
|
* @param {object} object Zinc object
|
|
961
1037
|
*/
|
|
962
|
-
play: function(flag) {
|
|
1038
|
+
play: function (flag) {
|
|
963
1039
|
this.$module.playAnimation(flag);
|
|
964
1040
|
this.isPlaying = flag;
|
|
965
1041
|
//Hide tooltip as location may
|
|
@@ -968,15 +1044,15 @@ export default {
|
|
|
968
1044
|
/**
|
|
969
1045
|
* Function to toggle on/off overlay help.
|
|
970
1046
|
*/
|
|
971
|
-
setHelpMode: function(helpMode) {
|
|
1047
|
+
setHelpMode: function (helpMode) {
|
|
972
1048
|
if (helpMode) {
|
|
973
1049
|
this.inHelp = true;
|
|
974
|
-
this.hoverVisibilities.forEach(item => {
|
|
1050
|
+
this.hoverVisibilities.forEach((item) => {
|
|
975
1051
|
item.value = true;
|
|
976
1052
|
});
|
|
977
1053
|
} else {
|
|
978
1054
|
this.inHelp = false;
|
|
979
|
-
this.hoverVisibilities.forEach(item => {
|
|
1055
|
+
this.hoverVisibilities.forEach((item) => {
|
|
980
1056
|
item.value = false;
|
|
981
1057
|
});
|
|
982
1058
|
}
|
|
@@ -985,23 +1061,32 @@ export default {
|
|
|
985
1061
|
* Callback function used by showRegionTooltip in the case when the tooltip
|
|
986
1062
|
* is out of view.
|
|
987
1063
|
*/
|
|
988
|
-
displayTooltipOfObjectsCallback: function(
|
|
1064
|
+
displayTooltipOfObjectsCallback: function (
|
|
1065
|
+
name,
|
|
1066
|
+
objects,
|
|
1067
|
+
resetView,
|
|
1068
|
+
liveUpdates
|
|
1069
|
+
) {
|
|
989
1070
|
const instance = this;
|
|
990
|
-
return function() {
|
|
991
|
-
instance.$module.zincRenderer.removePostRenderCallbackFunction(
|
|
1071
|
+
return function () {
|
|
1072
|
+
instance.$module.zincRenderer.removePostRenderCallbackFunction(
|
|
1073
|
+
instance.$_regionTooltipCallback
|
|
1074
|
+
);
|
|
992
1075
|
instance.$_regionTooltipCallback = undefined;
|
|
993
1076
|
instance.displayTooltipOfObjects(name, objects, resetView, liveUpdates);
|
|
994
|
-
}
|
|
1077
|
+
};
|
|
995
1078
|
},
|
|
996
|
-
liveUpdateTooltipPosition: function() {
|
|
1079
|
+
liveUpdateTooltipPosition: function () {
|
|
997
1080
|
if (this.$module.selectedCenter) {
|
|
998
1081
|
this.tData.x = this.$module.selectedScreenCoordinates.x;
|
|
999
1082
|
this.tData.y = this.$module.selectedScreenCoordinates.y;
|
|
1000
1083
|
}
|
|
1001
1084
|
},
|
|
1002
|
-
displayTooltipOfObjects: function(name, objects, resetView, liveUpdates) {
|
|
1085
|
+
displayTooltipOfObjects: function (name, objects, resetView, liveUpdates) {
|
|
1003
1086
|
if (objects.length > 0) {
|
|
1004
|
-
let coords = objects[0].getClosestVertexDOMElementCoords(
|
|
1087
|
+
let coords = objects[0].getClosestVertexDOMElementCoords(
|
|
1088
|
+
this.$module.scene
|
|
1089
|
+
);
|
|
1005
1090
|
if (coords) {
|
|
1006
1091
|
//The coords is not in view, view all if resetView flag is true
|
|
1007
1092
|
if (!coords.inView) {
|
|
@@ -1011,11 +1096,18 @@ export default {
|
|
|
1011
1096
|
//Use the post render callback to make sure the scene has been updated
|
|
1012
1097
|
//before getting the position of the tooltip.
|
|
1013
1098
|
if (this.$_regionTooltipCallback) {
|
|
1014
|
-
this.$module.zincRenderer.removePostRenderCallbackFunction(
|
|
1099
|
+
this.$module.zincRenderer.removePostRenderCallbackFunction(
|
|
1100
|
+
this.$_regionTooltipCallback
|
|
1101
|
+
);
|
|
1015
1102
|
}
|
|
1016
|
-
this.$_regionTooltipCallback =
|
|
1103
|
+
this.$_regionTooltipCallback =
|
|
1017
1104
|
this.$module.zincRenderer.addPostRenderCallbackFunction(
|
|
1018
|
-
this.displayTooltipOfObjectsCallback(
|
|
1105
|
+
this.displayTooltipOfObjectsCallback(
|
|
1106
|
+
name,
|
|
1107
|
+
objects,
|
|
1108
|
+
resetView,
|
|
1109
|
+
liveUpdates
|
|
1110
|
+
)
|
|
1019
1111
|
);
|
|
1020
1112
|
}
|
|
1021
1113
|
} else {
|
|
@@ -1024,18 +1116,19 @@ export default {
|
|
|
1024
1116
|
this.tData.x = coords.position.x;
|
|
1025
1117
|
this.tData.y = coords.position.y;
|
|
1026
1118
|
const regionPath = objects[0].getRegion().getFullPath();
|
|
1027
|
-
if (regionPath)
|
|
1028
|
-
|
|
1029
|
-
else
|
|
1030
|
-
this.tData.region = "Root";
|
|
1119
|
+
if (regionPath) this.tData.region = regionPath;
|
|
1120
|
+
else this.tData.region = "Root";
|
|
1031
1121
|
if (liveUpdates) {
|
|
1032
1122
|
this.$module.setupLiveCoordinates(objects);
|
|
1033
1123
|
if (this.$_liveCoordinatesUpdated) {
|
|
1034
|
-
this.$module.zincRenderer.removePostRenderCallbackFunction(
|
|
1124
|
+
this.$module.zincRenderer.removePostRenderCallbackFunction(
|
|
1125
|
+
this.$_liveCoordinatesUpdated
|
|
1126
|
+
);
|
|
1035
1127
|
}
|
|
1036
|
-
this.$_liveCoordinatesUpdated =
|
|
1128
|
+
this.$_liveCoordinatesUpdated =
|
|
1037
1129
|
this.$module.zincRenderer.addPostRenderCallbackFunction(
|
|
1038
|
-
this.liveUpdateTooltipPosition
|
|
1130
|
+
this.liveUpdateTooltipPosition
|
|
1131
|
+
);
|
|
1039
1132
|
}
|
|
1040
1133
|
}
|
|
1041
1134
|
return true;
|
|
@@ -1045,24 +1138,31 @@ export default {
|
|
|
1045
1138
|
return false;
|
|
1046
1139
|
},
|
|
1047
1140
|
/**
|
|
1048
|
-
* Display the tooltip. When resetView is set to true, it will
|
|
1141
|
+
* Display the tooltip. When resetView is set to true, it will
|
|
1049
1142
|
* reset view if the tooltip is not in view.
|
|
1050
|
-
* Setting liveUpdates to true will update the tooltip location
|
|
1143
|
+
* Setting liveUpdates to true will update the tooltip location
|
|
1051
1144
|
* at every rendering loop.
|
|
1052
1145
|
*/
|
|
1053
|
-
showRegionTooltip: function(name, resetView, liveUpdates) {
|
|
1146
|
+
showRegionTooltip: function (name, resetView, liveUpdates) {
|
|
1054
1147
|
if (name && this.$module.scene) {
|
|
1055
1148
|
const rootRegion = this.$module.scene.getRootRegion();
|
|
1056
1149
|
const groups = [name];
|
|
1057
1150
|
const objects = findObjectsWithNames(rootRegion, groups, "", true);
|
|
1058
|
-
return this.displayTooltipOfObjects(
|
|
1151
|
+
return this.displayTooltipOfObjects(
|
|
1152
|
+
name,
|
|
1153
|
+
objects,
|
|
1154
|
+
resetView,
|
|
1155
|
+
liveUpdates
|
|
1156
|
+
);
|
|
1059
1157
|
}
|
|
1060
1158
|
this.hideRegionTooltip();
|
|
1061
1159
|
return false;
|
|
1062
1160
|
},
|
|
1063
|
-
hideRegionTooltip: function() {
|
|
1161
|
+
hideRegionTooltip: function () {
|
|
1064
1162
|
if (this.$_liveCoordinatesUpdated) {
|
|
1065
|
-
this.$module.zincRenderer.removePostRenderCallbackFunction(
|
|
1163
|
+
this.$module.zincRenderer.removePostRenderCallbackFunction(
|
|
1164
|
+
this.$_liveCoordinatesUpdated
|
|
1165
|
+
);
|
|
1066
1166
|
//Unset the tracking
|
|
1067
1167
|
this.$module.setupLiveCoordinates(undefined);
|
|
1068
1168
|
}
|
|
@@ -1073,7 +1173,7 @@ export default {
|
|
|
1073
1173
|
* This is called when mouse cursor enters supported elements
|
|
1074
1174
|
* with help tootltips.
|
|
1075
1175
|
*/
|
|
1076
|
-
showHelpText: function(helpTextNumber) {
|
|
1176
|
+
showHelpText: function (helpTextNumber) {
|
|
1077
1177
|
if (!this.inHelp) {
|
|
1078
1178
|
this.helpTextWait = setTimeout(() => {
|
|
1079
1179
|
this.hoverVisibilities[helpTextNumber].value = true;
|
|
@@ -1083,13 +1183,13 @@ export default {
|
|
|
1083
1183
|
/**
|
|
1084
1184
|
* This is called when mouse cursor exits supported element..
|
|
1085
1185
|
*/
|
|
1086
|
-
hideHelpText: function(helpTextNumber) {
|
|
1186
|
+
hideHelpText: function (helpTextNumber) {
|
|
1087
1187
|
if (!this.inHelp) {
|
|
1088
1188
|
this.hoverVisibilities[helpTextNumber].value = false;
|
|
1089
1189
|
clearTimeout(this.helpTextWait);
|
|
1090
1190
|
}
|
|
1091
1191
|
},
|
|
1092
|
-
search: function(text, displayLabel) {
|
|
1192
|
+
search: function (text, displayLabel) {
|
|
1093
1193
|
if (this.$_searchIndex) {
|
|
1094
1194
|
if (text === undefined || text === "") {
|
|
1095
1195
|
this.objectSelected([], true);
|
|
@@ -1101,7 +1201,11 @@ export default {
|
|
|
1101
1201
|
if (displayLabel) {
|
|
1102
1202
|
for (let i = 0; i < zincObjectResults.length; i++) {
|
|
1103
1203
|
if (zincObjectResults[i] && zincObjectResults[i].groupName) {
|
|
1104
|
-
this.showRegionTooltip(
|
|
1204
|
+
this.showRegionTooltip(
|
|
1205
|
+
zincObjectResults[i].groupName,
|
|
1206
|
+
true,
|
|
1207
|
+
true
|
|
1208
|
+
);
|
|
1105
1209
|
}
|
|
1106
1210
|
}
|
|
1107
1211
|
}
|
|
@@ -1116,27 +1220,25 @@ export default {
|
|
|
1116
1220
|
/**
|
|
1117
1221
|
* Get the list of suggested terms
|
|
1118
1222
|
*/
|
|
1119
|
-
fetchSuggestions: function(term) {
|
|
1120
|
-
if(this.$_searchIndex === undefined)
|
|
1121
|
-
return [];
|
|
1223
|
+
fetchSuggestions: function (term) {
|
|
1224
|
+
if (this.$_searchIndex === undefined) return [];
|
|
1122
1225
|
return this.$_searchIndex.auto_suggest(term);
|
|
1123
1226
|
},
|
|
1124
1227
|
/**
|
|
1125
1228
|
* Called when minimap settings has changed. Pass the
|
|
1126
1229
|
* parameters to ZincJS and marked it for update.
|
|
1127
1230
|
*/
|
|
1128
|
-
updateMinimapScissor: function() {
|
|
1129
|
-
Object.keys(this.minimapSettings).forEach(key => {
|
|
1231
|
+
updateMinimapScissor: function () {
|
|
1232
|
+
Object.keys(this.minimapSettings).forEach((key) => {
|
|
1130
1233
|
this.$module.scene.minimapScissor[key] = this.minimapSettings[key];
|
|
1131
1234
|
});
|
|
1132
1235
|
this.$module.scene.minimapScissor.updateRequired = true;
|
|
1133
1236
|
},
|
|
1134
|
-
updateSettingsfromScene: function() {
|
|
1237
|
+
updateSettingsfromScene: function () {
|
|
1135
1238
|
this.currentSpeed = 1;
|
|
1136
1239
|
this.$module.setPlayRate(this.defaultRate);
|
|
1137
|
-
this.orginalDuration =
|
|
1138
|
-
"OriginalDuration"
|
|
1139
|
-
);
|
|
1240
|
+
this.orginalDuration =
|
|
1241
|
+
this.$module.scene.getMetadataTag("OriginalDuration");
|
|
1140
1242
|
this.animateDuration = this.$module.scene.getMetadataTag("Duration");
|
|
1141
1243
|
let timeStamps = this.$module.scene.getMetadataTag("TimeStamps");
|
|
1142
1244
|
this.timeStamps = {};
|
|
@@ -1145,7 +1247,7 @@ export default {
|
|
|
1145
1247
|
}
|
|
1146
1248
|
this.timeMax = this.$module.scene.getDuration();
|
|
1147
1249
|
},
|
|
1148
|
-
setURLFinishCallback: function(options) {
|
|
1250
|
+
setURLFinishCallback: function (options) {
|
|
1149
1251
|
return () => {
|
|
1150
1252
|
if (options) {
|
|
1151
1253
|
if (options.viewport) {
|
|
@@ -1179,7 +1281,7 @@ export default {
|
|
|
1179
1281
|
*
|
|
1180
1282
|
* @public
|
|
1181
1283
|
*/
|
|
1182
|
-
getState: function() {
|
|
1284
|
+
getState: function () {
|
|
1183
1285
|
let state = {
|
|
1184
1286
|
format: this.fileFormat,
|
|
1185
1287
|
url: this._currentURL,
|
|
@@ -1200,13 +1302,13 @@ export default {
|
|
|
1200
1302
|
*
|
|
1201
1303
|
* @public
|
|
1202
1304
|
*/
|
|
1203
|
-
setState: function(state) {
|
|
1305
|
+
setState: function (state) {
|
|
1204
1306
|
if (state) {
|
|
1205
1307
|
if (state.url && state.url !== this._currentURL) {
|
|
1206
1308
|
this.setURLAndState(state.url, {
|
|
1207
1309
|
fileFormat: state.fileFormat,
|
|
1208
1310
|
viewport: state.viewport,
|
|
1209
|
-
visibility: state.visibility
|
|
1311
|
+
visibility: state.visibility,
|
|
1210
1312
|
});
|
|
1211
1313
|
} else {
|
|
1212
1314
|
if (state.viewport || state.visibility) {
|
|
@@ -1221,7 +1323,7 @@ export default {
|
|
|
1221
1323
|
this.$module.setFinishDownloadCallback(
|
|
1222
1324
|
this.setURLFinishCallback({
|
|
1223
1325
|
viewport: state.viewport,
|
|
1224
|
-
visibility: state.visibility
|
|
1326
|
+
visibility: state.visibility,
|
|
1225
1327
|
})
|
|
1226
1328
|
);
|
|
1227
1329
|
}
|
|
@@ -1229,7 +1331,7 @@ export default {
|
|
|
1229
1331
|
}
|
|
1230
1332
|
}
|
|
1231
1333
|
},
|
|
1232
|
-
exportGLTF: function(binary) {
|
|
1334
|
+
exportGLTF: function (binary) {
|
|
1233
1335
|
return this.$module.scene.exportGLTF(binary);
|
|
1234
1336
|
},
|
|
1235
1337
|
/**
|
|
@@ -1239,15 +1341,14 @@ export default {
|
|
|
1239
1341
|
*
|
|
1240
1342
|
* @public
|
|
1241
1343
|
*/
|
|
1242
|
-
setURLAndState: function(newValue, state) {
|
|
1344
|
+
setURLAndState: function (newValue, state) {
|
|
1243
1345
|
if (newValue != this._currentURL) {
|
|
1244
1346
|
if (state && state.format) this.fileFormat = state.format;
|
|
1245
1347
|
let viewport = state && state.viewport ? state.viewport : undefined;
|
|
1246
1348
|
let visibility =
|
|
1247
1349
|
state && state.visibility ? state.visibility : undefined;
|
|
1248
1350
|
this._currentURL = newValue;
|
|
1249
|
-
if (this.$refs.treeControls)
|
|
1250
|
-
this.$refs.treeControls.clear();
|
|
1351
|
+
if (this.$refs.treeControls) this.$refs.treeControls.clear();
|
|
1251
1352
|
this.loading = true;
|
|
1252
1353
|
this.isReady = false;
|
|
1253
1354
|
this.$module.setFinishDownloadCallback(
|
|
@@ -1255,7 +1356,7 @@ export default {
|
|
|
1255
1356
|
viewport: viewport,
|
|
1256
1357
|
region: this.region,
|
|
1257
1358
|
viewURL: this.viewURL,
|
|
1258
|
-
visibility: visibility
|
|
1359
|
+
visibility: visibility,
|
|
1259
1360
|
})
|
|
1260
1361
|
);
|
|
1261
1362
|
if (this.fileFormat === "gltf") {
|
|
@@ -1285,20 +1386,20 @@ export default {
|
|
|
1285
1386
|
*
|
|
1286
1387
|
* @public
|
|
1287
1388
|
*/
|
|
1288
|
-
setURL: function(newValue) {
|
|
1389
|
+
setURL: function (newValue) {
|
|
1289
1390
|
this.setURLAndState(newValue, undefined);
|
|
1290
1391
|
},
|
|
1291
1392
|
/**
|
|
1292
1393
|
* Callback when drawer is toggled.
|
|
1293
1394
|
*/
|
|
1294
|
-
drawerToggled: function(flag) {
|
|
1395
|
+
drawerToggled: function (flag) {
|
|
1295
1396
|
this.drawerOpen = flag;
|
|
1296
1397
|
this.adjustLayout();
|
|
1297
1398
|
},
|
|
1298
1399
|
/**
|
|
1299
1400
|
* Callback using ResizeObserver.
|
|
1300
1401
|
*/
|
|
1301
|
-
adjustLayout: function() {
|
|
1402
|
+
adjustLayout: function () {
|
|
1302
1403
|
let width = this.$refs.scaffoldContainer.clientWidth;
|
|
1303
1404
|
this.minimisedSlider = width < 812;
|
|
1304
1405
|
if (this.minimisedSlider) {
|
|
@@ -1307,7 +1408,7 @@ export default {
|
|
|
1307
1408
|
this.sliderPosition = "";
|
|
1308
1409
|
}
|
|
1309
1410
|
},
|
|
1310
|
-
toggleRendering: function(flag) {
|
|
1411
|
+
toggleRendering: function (flag) {
|
|
1311
1412
|
if (this.$module.zincRenderer) {
|
|
1312
1413
|
if (flag) {
|
|
1313
1414
|
this.$module.zincRenderer.animate();
|
|
@@ -1316,32 +1417,33 @@ export default {
|
|
|
1316
1417
|
}
|
|
1317
1418
|
}
|
|
1318
1419
|
},
|
|
1319
|
-
forceResize: function() {
|
|
1420
|
+
forceResize: function () {
|
|
1320
1421
|
if (this.$module.zincRenderer) {
|
|
1321
1422
|
this.$module.zincRenderer.onWindowResize();
|
|
1322
1423
|
}
|
|
1323
1424
|
},
|
|
1324
|
-
syncControlCallback: function() {
|
|
1425
|
+
syncControlCallback: function () {
|
|
1325
1426
|
const payload = this.$module.NDCCameraControl.getPanZoom();
|
|
1326
1427
|
if (this.tData.visible) {
|
|
1327
1428
|
this.showRegionTooltip(this.tData.label);
|
|
1328
1429
|
}
|
|
1329
1430
|
this.$emit("scaffold-navigated", payload);
|
|
1330
1431
|
},
|
|
1331
|
-
/**
|
|
1432
|
+
/**
|
|
1332
1433
|
* Rotate mode - "none", "horizontal", "vertical", "free" but
|
|
1333
1434
|
* it will be ignored if flag is set to false.
|
|
1334
1435
|
*/
|
|
1335
|
-
toggleSyncControl: function(flag, rotateMode) {
|
|
1436
|
+
toggleSyncControl: function (flag, rotateMode) {
|
|
1336
1437
|
this.$module.toggleSyncControl(flag, rotateMode);
|
|
1337
1438
|
this.$module.setSyncControlCallback(this.syncControlCallback);
|
|
1338
|
-
}
|
|
1339
|
-
}
|
|
1439
|
+
},
|
|
1440
|
+
},
|
|
1340
1441
|
};
|
|
1341
1442
|
</script>
|
|
1342
1443
|
|
|
1343
1444
|
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
|
1344
1445
|
<style scoped lang="scss">
|
|
1446
|
+
@import "~element-ui/packages/theme-chalk/src/button";
|
|
1345
1447
|
@import "~element-ui/packages/theme-chalk/src/col";
|
|
1346
1448
|
@import "~element-ui/packages/theme-chalk/src/loading";
|
|
1347
1449
|
@import "~element-ui/packages/theme-chalk/src/option";
|
|
@@ -1352,7 +1454,6 @@ export default {
|
|
|
1352
1454
|
@import "~element-ui/packages/theme-chalk/src/tabs";
|
|
1353
1455
|
@import "~element-ui/packages/theme-chalk/src/tab-pane";
|
|
1354
1456
|
|
|
1355
|
-
|
|
1356
1457
|
.message-icon {
|
|
1357
1458
|
position: absolute;
|
|
1358
1459
|
top: 15px;
|
|
@@ -1514,7 +1615,35 @@ export default {
|
|
|
1514
1615
|
}
|
|
1515
1616
|
}
|
|
1516
1617
|
|
|
1517
|
-
.
|
|
1618
|
+
::v-deep .open-map-popper {
|
|
1619
|
+
padding-top: 5px;
|
|
1620
|
+
padding-bottom: 5px;
|
|
1621
|
+
background-color: #ffffff;
|
|
1622
|
+
border: 1px solid $app-primary-color;
|
|
1623
|
+
box-shadow: 0px 2px 12px 0px rgba(0, 0, 0, 0.06);
|
|
1624
|
+
width: 128px;
|
|
1625
|
+
min-width: 128px;
|
|
1626
|
+
|
|
1627
|
+
.el-row ~ .el-row {
|
|
1628
|
+
margin-top: 8px;
|
|
1629
|
+
}
|
|
1630
|
+
|
|
1631
|
+
.el-button {
|
|
1632
|
+
padding-top:5px;
|
|
1633
|
+
padding-bottom:5px;
|
|
1634
|
+
}
|
|
1635
|
+
|
|
1636
|
+
&.el-popper[x-placement^="top"] {
|
|
1637
|
+
.popper__arrow {
|
|
1638
|
+
border-top-color: $app-primary-color !important;
|
|
1639
|
+
&:after {
|
|
1640
|
+
border-top-color: #fff !important;
|
|
1641
|
+
}
|
|
1642
|
+
}
|
|
1643
|
+
}
|
|
1644
|
+
}
|
|
1645
|
+
|
|
1646
|
+
.settings-group {
|
|
1518
1647
|
bottom: 16px;
|
|
1519
1648
|
position: absolute;
|
|
1520
1649
|
transition: all 1s ease;
|
|
@@ -1683,7 +1812,8 @@ export default {
|
|
|
1683
1812
|
}
|
|
1684
1813
|
|
|
1685
1814
|
::v-deep .el-loading-spinner {
|
|
1686
|
-
i,
|
|
1815
|
+
i,
|
|
1816
|
+
.el-loading-text {
|
|
1687
1817
|
color: $app-primary-color;
|
|
1688
1818
|
}
|
|
1689
1819
|
}
|
|
@@ -1742,7 +1872,7 @@ export default {
|
|
|
1742
1872
|
|
|
1743
1873
|
.opacity-box {
|
|
1744
1874
|
right: 0px;
|
|
1745
|
-
bottom:200px;
|
|
1746
|
-
position:absolute;
|
|
1875
|
+
bottom: 200px;
|
|
1876
|
+
position: absolute;
|
|
1747
1877
|
}
|
|
1748
1878
|
</style>
|