@abi-software/scaffoldvuer 1.11.4-beta.1 → 1.13.0-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/dist/scaffoldvuer.js +5339 -5340
- package/dist/scaffoldvuer.umd.cjs +153 -153
- package/dist/style.css +1 -1
- package/package.json +3 -3
- package/src/components/ScaffoldOverlay.vue +14 -31
- package/src/components/ScaffoldVuer.vue +11 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abi-software/scaffoldvuer",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.13.0-beta.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"*.js"
|
|
42
42
|
],
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@abi-software/map-utilities": "^1.7.
|
|
44
|
+
"@abi-software/map-utilities": "^1.7.6",
|
|
45
45
|
"@abi-software/sparc-annotation": "^0.3.2",
|
|
46
46
|
"@abi-software/svg-sprite": "1.0.2",
|
|
47
47
|
"@element-plus/icons-vue": "^2.3.1",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"unplugin-vue-components": "^0.26.0",
|
|
54
54
|
"vue": "^3.4.21",
|
|
55
55
|
"vue-router": "^4.2.5",
|
|
56
|
-
"zincjs": "1.
|
|
56
|
+
"zincjs": "^1.16.0"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"@babel/eslint-parser": "^7.28.0",
|
|
@@ -19,40 +19,15 @@
|
|
|
19
19
|
@click.capture="forwardEvent"
|
|
20
20
|
>
|
|
21
21
|
<div
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
v-for="overlay in rotationOverlays"
|
|
23
|
+
:key="overlay.position"
|
|
24
|
+
:class="['rotation-overlay', overlay.position, touchActive ? 'touch-active' : '']"
|
|
25
|
+
@mousedown="(event) => {setRotationMode(event, overlay.mode); forwardEvent(event)}"
|
|
24
26
|
@mouseup="forwardEvent"
|
|
25
|
-
@touchstart="(event) => {setRotationMode(event,
|
|
27
|
+
@touchstart="(event) => {setRotationMode(event, overlay.mode); forwardTouchEvent(event)}"
|
|
26
28
|
@touchend="forwardTouchEvent"
|
|
27
29
|
>
|
|
28
|
-
<span>
|
|
29
|
-
</div>
|
|
30
|
-
<div
|
|
31
|
-
:class="['rotation-overlay', 'bottom', touchActive ? 'touch-active' : '']"
|
|
32
|
-
@mousedown="(event) => {setRotationMode(event, 'vertical'); forwardEvent(event)}"
|
|
33
|
-
@mouseup="forwardEvent"
|
|
34
|
-
@touchstart="(event) => {setRotationMode(event, 'vertical'); forwardTouchEvent(event)}"
|
|
35
|
-
@touchend="forwardTouchEvent"
|
|
36
|
-
>
|
|
37
|
-
<span>Begin interaction here to rotate on the x-axis</span>
|
|
38
|
-
</div>
|
|
39
|
-
<div
|
|
40
|
-
:class="['rotation-overlay', 'left', touchActive ? 'touch-active' : '']"
|
|
41
|
-
@mousedown="(event) => {setRotationMode(event, 'horizontal'); forwardEvent(event)}"
|
|
42
|
-
@mouseup="forwardEvent"
|
|
43
|
-
@touchstart="(event) => {setRotationMode(event, 'horizontal'); forwardTouchEvent(event)}"
|
|
44
|
-
@touchend="forwardTouchEvent"
|
|
45
|
-
>
|
|
46
|
-
<span>Begin interaction here to rotate on the y-axis</span>
|
|
47
|
-
</div>
|
|
48
|
-
<div
|
|
49
|
-
:class="['rotation-overlay', 'right', touchActive ? 'touch-active' : '']"
|
|
50
|
-
@mousedown="(event) => {setRotationMode(event, 'horizontal'); forwardEvent(event)}"
|
|
51
|
-
@mouseup="forwardEvent"
|
|
52
|
-
@touchstart="(event) => {setRotationMode(event, 'horizontal'); forwardTouchEvent(event)}"
|
|
53
|
-
@touchend="forwardTouchEvent"
|
|
54
|
-
>
|
|
55
|
-
<span>Begin interaction here to rotate on the y-axis</span>
|
|
30
|
+
<span>{{ overlay.text }}</span>
|
|
56
31
|
</div>
|
|
57
32
|
</div>
|
|
58
33
|
|
|
@@ -62,12 +37,20 @@
|
|
|
62
37
|
<script>
|
|
63
38
|
/* eslint-disable no-alert, no-console */
|
|
64
39
|
|
|
40
|
+
const rotationOverlays = [
|
|
41
|
+
{ position: 'top', mode: 'vertical', text: 'Begin interaction here to rotate on the x-axis' },
|
|
42
|
+
{ position: 'bottom', mode: 'vertical', text: 'Begin interaction here to rotate on the x-axis' },
|
|
43
|
+
{ position: 'left', mode: 'horizontal', text: 'Begin interaction here to rotate on the y-axis' },
|
|
44
|
+
{ position: 'right', mode: 'horizontal', text: 'Begin interaction here to rotate on the y-axis' },
|
|
45
|
+
];
|
|
46
|
+
|
|
65
47
|
export default {
|
|
66
48
|
name: "ScaffoldOverlay",
|
|
67
49
|
data: function () {
|
|
68
50
|
return {
|
|
69
51
|
lockRotationMode: false,
|
|
70
52
|
touchActive: false,
|
|
53
|
+
rotationOverlays: rotationOverlays,
|
|
71
54
|
}
|
|
72
55
|
},
|
|
73
56
|
props: {
|
|
@@ -1050,6 +1050,9 @@ export default {
|
|
|
1050
1050
|
this.$module.zincRenderer.addPreRenderCallbackFunction(() => {
|
|
1051
1051
|
this.currentTime = this.$module.getCurrentTime();
|
|
1052
1052
|
})
|
|
1053
|
+
this.$module.zincRenderer.addContextRestoredCallbackFunction(() => {
|
|
1054
|
+
this.backgroundChangeCallback(this.currentBackground);
|
|
1055
|
+
})
|
|
1053
1056
|
},
|
|
1054
1057
|
beforeUnmount: function () {
|
|
1055
1058
|
if (this.ro) this.ro.disconnect();
|
|
@@ -1584,7 +1587,6 @@ export default {
|
|
|
1584
1587
|
},
|
|
1585
1588
|
setRotationMode: function(mode) {
|
|
1586
1589
|
if (this.$module.scene) {
|
|
1587
|
-
console.log("here", mode)
|
|
1588
1590
|
const cameracontrol = this.$module.scene.getZincCameraControls();
|
|
1589
1591
|
cameracontrol.setRotationMode(mode);
|
|
1590
1592
|
}
|
|
@@ -2283,6 +2285,12 @@ export default {
|
|
|
2283
2285
|
emitOfflineAnnotationUpdate: function () {
|
|
2284
2286
|
this.$emit('update-offline-annotation-enabled', this.offlineAnnotationEnabled);
|
|
2285
2287
|
},
|
|
2288
|
+
forceContextRestore: function() {
|
|
2289
|
+
this.$module.zincRenderer.forceContextRestore();
|
|
2290
|
+
},
|
|
2291
|
+
forceContextLoss: function() {
|
|
2292
|
+
this.$module.zincRenderer.forceContextLoss();
|
|
2293
|
+
},
|
|
2286
2294
|
/**
|
|
2287
2295
|
* @public
|
|
2288
2296
|
* Hide the tooltip
|
|
@@ -2813,9 +2821,11 @@ export default {
|
|
|
2813
2821
|
toggleRendering: function (flag) {
|
|
2814
2822
|
if (this.$module.zincRenderer) {
|
|
2815
2823
|
if (flag) {
|
|
2824
|
+
this.forceContextRestore();
|
|
2816
2825
|
this.$module.zincRenderer.animate();
|
|
2817
2826
|
} else {
|
|
2818
2827
|
this.$module.zincRenderer.stopAnimate();
|
|
2828
|
+
this.forceContextLoss();
|
|
2819
2829
|
}
|
|
2820
2830
|
}
|
|
2821
2831
|
},
|