@abi-software/scaffoldvuer 1.11.4-beta.1 → 1.12.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abi-software/scaffoldvuer",
3
- "version": "1.11.4-beta.1",
3
+ "version": "1.12.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.1",
44
+ "@abi-software/map-utilities": "^1.7.4",
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",
@@ -19,40 +19,15 @@
19
19
  @click.capture="forwardEvent"
20
20
  >
21
21
  <div
22
- :class="['rotation-overlay', 'top', touchActive ? 'touch-active' : '']"
23
- @mousedown="(event) => {setRotationMode(event, 'vertical'); forwardEvent(event)}"
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, 'vertical'); forwardTouchEvent(event)}"
27
+ @touchstart="(event) => {setRotationMode(event, overlay.mode); forwardTouchEvent(event)}"
26
28
  @touchend="forwardTouchEvent"
27
29
  >
28
- <span>Begin interaction here to rotate on the x-axis</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: {
@@ -1584,7 +1584,6 @@ export default {
1584
1584
  },
1585
1585
  setRotationMode: function(mode) {
1586
1586
  if (this.$module.scene) {
1587
- console.log("here", mode)
1588
1587
  const cameracontrol = this.$module.scene.getZincCameraControls();
1589
1588
  cameracontrol.setRotationMode(mode);
1590
1589
  }