@abi-software/scaffoldvuer 1.11.4-beta.0 → 1.11.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/scaffoldvuer.js +280 -222
- package/dist/scaffoldvuer.umd.cjs +3 -3
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/App.vue +9 -7
- package/src/components/ScaffoldOverlay.vue +88 -21
- package/src/components/ScaffoldVuer.vue +13 -6
package/package.json
CHANGED
package/src/App.vue
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<ScaffoldVuer
|
|
6
6
|
v-if="url"
|
|
7
7
|
ref="scaffold"
|
|
8
|
-
class="vuer"
|
|
8
|
+
class="demo-vuer"
|
|
9
9
|
:flatmapAPI="flatmapAPI"
|
|
10
10
|
:display-u-i="displayUI"
|
|
11
11
|
:url="url"
|
|
@@ -49,10 +49,8 @@
|
|
|
49
49
|
@show-next="onHelpModeShowNext"
|
|
50
50
|
@finish-help-mode="onFinishHelpMode"
|
|
51
51
|
/>
|
|
52
|
-
|
|
53
52
|
<el-popover popper-class="options-container" placement="bottom" trigger="click" width="500" :teleported="false">
|
|
54
53
|
<div>
|
|
55
|
-
|
|
56
54
|
<el-row :gutter="20">
|
|
57
55
|
<el-col>
|
|
58
56
|
<p>{{ selectedCoordinates }}</p>
|
|
@@ -302,12 +300,12 @@
|
|
|
302
300
|
</Suspense>
|
|
303
301
|
</template>
|
|
304
302
|
<template #reference>
|
|
305
|
-
<el-button class="models-button" :icon="ElIconFolderOpened">
|
|
303
|
+
<el-button class="models-button control-layer" :icon="ElIconFolderOpened">
|
|
306
304
|
Models
|
|
307
305
|
</el-button>
|
|
308
306
|
</template>
|
|
309
307
|
</el-popover>
|
|
310
|
-
<el-autocomplete v-model="searchText" class="search-box" placeholder="Search" :fetch-suggestions="fetchSuggestions"
|
|
308
|
+
<el-autocomplete v-model="searchText" class="search-box control-layer" placeholder="Search" :fetch-suggestions="fetchSuggestions"
|
|
311
309
|
:teleported="false" popper-class="autocomplete-popper" @keyup.enter="search(searchText)"
|
|
312
310
|
@select="search(searchText)">
|
|
313
311
|
<template #default="{ item }">
|
|
@@ -404,7 +402,7 @@ export default {
|
|
|
404
402
|
tumbleDirection: [1.0, 0.0],
|
|
405
403
|
showColourPicker: true,
|
|
406
404
|
markerCluster: false,
|
|
407
|
-
positionalRotation:
|
|
405
|
+
positionalRotation: true,
|
|
408
406
|
minimapSettings: {
|
|
409
407
|
x_offset: 16,
|
|
410
408
|
y_offset: 50,
|
|
@@ -864,7 +862,7 @@ body {
|
|
|
864
862
|
}
|
|
865
863
|
}
|
|
866
864
|
|
|
867
|
-
.vuer {
|
|
865
|
+
.demo-vuer {
|
|
868
866
|
position: absolute;
|
|
869
867
|
width: 100%;
|
|
870
868
|
height: 100%;
|
|
@@ -924,6 +922,10 @@ svg.map-icon {
|
|
|
924
922
|
color: $app-primary-color;
|
|
925
923
|
}
|
|
926
924
|
|
|
925
|
+
.control-layer {
|
|
926
|
+
z-index: 2;
|
|
927
|
+
}
|
|
928
|
+
|
|
927
929
|
input[type="file"] {
|
|
928
930
|
display: none;
|
|
929
931
|
}
|
|
@@ -2,43 +2,60 @@
|
|
|
2
2
|
<div
|
|
3
3
|
ref="overlay"
|
|
4
4
|
>
|
|
5
|
+
<div
|
|
6
|
+
class="content-layer" ref="contentLayer"
|
|
7
|
+
@mouseleave.capture="skipWhenInBound"
|
|
8
|
+
@mousedown.capture="(event) => contentMouseActive(event, true)"
|
|
9
|
+
@mouseup.capture="(event) => contentMouseActive(event, false)"
|
|
10
|
+
@touchstart.capture="(event) => contentMouseActive(event, true)"
|
|
11
|
+
@touchend.capture="(event) => contentMouseActive(event, false)"
|
|
12
|
+
>
|
|
13
|
+
<slot />
|
|
14
|
+
</div>
|
|
5
15
|
<div v-if="positionalRotation" ref="topLayer"
|
|
6
16
|
@mousemove.capture="forwardEvent"
|
|
7
17
|
@mouseover.capture="forwardEvent"
|
|
18
|
+
@touchmove.capture="forwardTouchEvent"
|
|
8
19
|
@click.capture="forwardEvent"
|
|
9
20
|
>
|
|
10
|
-
<div
|
|
21
|
+
<div
|
|
22
|
+
:class="['rotation-overlay', 'top', touchActive ? 'touch-active' : '']"
|
|
11
23
|
@mousedown="(event) => {setRotationMode(event, 'vertical'); forwardEvent(event)}"
|
|
12
24
|
@mouseup="forwardEvent"
|
|
25
|
+
@touchstart="(event) => {setRotationMode(event, 'vertical'); forwardTouchEvent(event)}"
|
|
26
|
+
@touchend="forwardTouchEvent"
|
|
13
27
|
>
|
|
14
|
-
<span>
|
|
28
|
+
<span>Begin interaction here to rotate on the x-axis</span>
|
|
15
29
|
</div>
|
|
16
|
-
<div
|
|
30
|
+
<div
|
|
31
|
+
:class="['rotation-overlay', 'bottom', touchActive ? 'touch-active' : '']"
|
|
17
32
|
@mousedown="(event) => {setRotationMode(event, 'vertical'); forwardEvent(event)}"
|
|
18
33
|
@mouseup="forwardEvent"
|
|
34
|
+
@touchstart="(event) => {setRotationMode(event, 'vertical'); forwardTouchEvent(event)}"
|
|
35
|
+
@touchend="forwardTouchEvent"
|
|
19
36
|
>
|
|
20
|
-
<span>
|
|
37
|
+
<span>Begin interaction here to rotate on the x-axis</span>
|
|
21
38
|
</div>
|
|
22
|
-
<div
|
|
39
|
+
<div
|
|
40
|
+
:class="['rotation-overlay', 'left', touchActive ? 'touch-active' : '']"
|
|
23
41
|
@mousedown="(event) => {setRotationMode(event, 'horizontal'); forwardEvent(event)}"
|
|
24
42
|
@mouseup="forwardEvent"
|
|
43
|
+
@touchstart="(event) => {setRotationMode(event, 'horizontal'); forwardTouchEvent(event)}"
|
|
44
|
+
@touchend="forwardTouchEvent"
|
|
25
45
|
>
|
|
26
|
-
<span>
|
|
46
|
+
<span>Begin interaction here to rotate on the y-axis</span>
|
|
27
47
|
</div>
|
|
28
|
-
<div
|
|
48
|
+
<div
|
|
49
|
+
:class="['rotation-overlay', 'right', touchActive ? 'touch-active' : '']"
|
|
29
50
|
@mousedown="(event) => {setRotationMode(event, 'horizontal'); forwardEvent(event)}"
|
|
30
51
|
@mouseup="forwardEvent"
|
|
52
|
+
@touchstart="(event) => {setRotationMode(event, 'horizontal'); forwardTouchEvent(event)}"
|
|
53
|
+
@touchend="forwardTouchEvent"
|
|
31
54
|
>
|
|
32
|
-
<span>
|
|
55
|
+
<span>Begin interaction here to rotate on the y-axis</span>
|
|
33
56
|
</div>
|
|
34
57
|
</div>
|
|
35
|
-
|
|
36
|
-
@mouseleave.capture="skipWhenInBound"
|
|
37
|
-
@mousedown.capture="(event) => contentMouseActive(event, true)"
|
|
38
|
-
@mouseup.capture="(event) => contentMouseActive(event, false)"
|
|
39
|
-
>
|
|
40
|
-
<slot />
|
|
41
|
-
</div>
|
|
58
|
+
|
|
42
59
|
</div>
|
|
43
60
|
</template>
|
|
44
61
|
|
|
@@ -50,6 +67,7 @@ export default {
|
|
|
50
67
|
data: function () {
|
|
51
68
|
return {
|
|
52
69
|
lockRotationMode: false,
|
|
70
|
+
touchActive: false,
|
|
53
71
|
}
|
|
54
72
|
},
|
|
55
73
|
props: {
|
|
@@ -66,20 +84,24 @@ export default {
|
|
|
66
84
|
contentMouseActive: function(event, flag) {
|
|
67
85
|
if (this.positionalRotation) {
|
|
68
86
|
const topLayer = this.$refs.topLayer;
|
|
69
|
-
|
|
70
87
|
if (topLayer) {
|
|
71
88
|
if (!flag) {
|
|
72
89
|
this.lockRotationMode = false;
|
|
73
90
|
this.setRotationMode(undefined, "free");
|
|
74
91
|
topLayer.style.pointerEvents = 'auto';
|
|
92
|
+
if (event.type === "touchend") {
|
|
93
|
+
this.touchActive = false;
|
|
94
|
+
}
|
|
75
95
|
}
|
|
76
96
|
else {
|
|
77
97
|
this.lockRotationMode = true;
|
|
78
98
|
topLayer.style.pointerEvents = 'none';
|
|
99
|
+
if (event.type === "touchstart") {
|
|
100
|
+
this.touchActive = true;
|
|
101
|
+
}
|
|
79
102
|
}
|
|
80
103
|
}
|
|
81
104
|
}
|
|
82
|
-
event.preventDefault();
|
|
83
105
|
},
|
|
84
106
|
setRotationMode: function(event, mode) {
|
|
85
107
|
if (!this.lockRotationMode) {
|
|
@@ -113,7 +135,6 @@ export default {
|
|
|
113
135
|
topLayer.style.pointerEvents = 'none';
|
|
114
136
|
const elementBelow = document.elementFromPoint(event.clientX, event.clientY);
|
|
115
137
|
//const elementBelow = this.$el;
|
|
116
|
-
topLayer.style.pointerEvents = 'auto';
|
|
117
138
|
topLayer.style.pointerEvents = pointerEvents;
|
|
118
139
|
//const elementBelow = this.$refs.contentLayer;
|
|
119
140
|
// Hide the top layer from pointer events
|
|
@@ -132,10 +153,52 @@ export default {
|
|
|
132
153
|
button: event.button,
|
|
133
154
|
}
|
|
134
155
|
);
|
|
135
|
-
|
|
136
156
|
elementBelow.dispatchEvent(newEvent);
|
|
157
|
+
event.stopPropagation();
|
|
158
|
+
}
|
|
159
|
+
event.preventDefault();
|
|
160
|
+
},
|
|
161
|
+
forwardTouchEvent: function(event) {
|
|
162
|
+
const topLayer = this.$refs.topLayer;
|
|
163
|
+
if (!topLayer) return;
|
|
164
|
+
// Find the element directly underneath the cursor
|
|
165
|
+
const pointerEvents = topLayer.style.pointerEvents;
|
|
166
|
+
topLayer.style.pointerEvents = 'none';
|
|
167
|
+
const firstTouch = event.changedTouches[0];
|
|
168
|
+
const clientX = firstTouch.clientX;
|
|
169
|
+
const clientY = firstTouch.clientY;
|
|
170
|
+
const elementBelow = document.elementFromPoint(clientX, clientY);
|
|
171
|
+
topLayer.style.pointerEvents = pointerEvents;
|
|
172
|
+
if (elementBelow) {
|
|
173
|
+
const newTouch = new Touch({
|
|
174
|
+
identifier: firstTouch.identifier,
|
|
175
|
+
target: elementBelow,
|
|
176
|
+
clientX: firstTouch.clientX,
|
|
177
|
+
clientY: firstTouch.clientY,
|
|
178
|
+
pageX: firstTouch.pageX,
|
|
179
|
+
pageY: firstTouch.pageY,
|
|
180
|
+
screenX: firstTouch.screenX,
|
|
181
|
+
screenY: firstTouch.screenY,
|
|
182
|
+
radiusX: firstTouch.radiusX,
|
|
183
|
+
radiusY: firstTouch.radiusY,
|
|
184
|
+
rotationAngle: firstTouch.rotationAngle,
|
|
185
|
+
force: firstTouch.force,
|
|
186
|
+
});
|
|
187
|
+
const newEvent = new TouchEvent(
|
|
188
|
+
event.type,
|
|
189
|
+
{
|
|
190
|
+
bubbles: event.bubbles,
|
|
191
|
+
cancelable: event.cancelable,
|
|
192
|
+
composed: true,
|
|
193
|
+
view: event.view,
|
|
194
|
+
touches: [newTouch],
|
|
195
|
+
targetTouches: [newTouch],
|
|
196
|
+
changedTouches: [newTouch],
|
|
197
|
+
}
|
|
198
|
+
);
|
|
199
|
+
elementBelow.dispatchEvent(newEvent);
|
|
200
|
+
event.stopPropagation();
|
|
137
201
|
}
|
|
138
|
-
event.stopPropagation();
|
|
139
202
|
event.preventDefault();
|
|
140
203
|
}
|
|
141
204
|
}
|
|
@@ -144,10 +207,14 @@ export default {
|
|
|
144
207
|
|
|
145
208
|
<style scoped lang="scss">
|
|
146
209
|
.rotation-overlay {
|
|
147
|
-
z-index:
|
|
210
|
+
z-index: 1;
|
|
148
211
|
background-color: transparent;
|
|
149
212
|
position:absolute;
|
|
150
213
|
opacity: 0;
|
|
214
|
+
&.touch-active {
|
|
215
|
+
opacity: 1;
|
|
216
|
+
background-color: rgba(173,216,230, 0.1)
|
|
217
|
+
}
|
|
151
218
|
&:hover {
|
|
152
219
|
opacity: 1;
|
|
153
220
|
background-color: rgba(173,216,230, 0.1)
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
<div v-show="displayUI && !isTransitioning">
|
|
36
36
|
<DrawToolbar
|
|
37
37
|
v-if="viewingMode === 'Annotation' && (authorisedUser || offlineAnnotationEnabled)"
|
|
38
|
+
class="control-layer"
|
|
38
39
|
:toolbarOptions="toolbarOptions"
|
|
39
40
|
:activeDrawTool="activeDrawTool"
|
|
40
41
|
:activeDrawMode="activeDrawMode"
|
|
@@ -57,7 +58,7 @@
|
|
|
57
58
|
<template #reference>
|
|
58
59
|
<div
|
|
59
60
|
v-if="displayWarning"
|
|
60
|
-
class="message-icon warning-icon"
|
|
61
|
+
class="message-icon warning-icon control-layer"
|
|
61
62
|
@mouseover="showHelpText(7)"
|
|
62
63
|
@mouseout="hideHelpText(7)"
|
|
63
64
|
>
|
|
@@ -79,7 +80,7 @@
|
|
|
79
80
|
<template #reference>
|
|
80
81
|
<div
|
|
81
82
|
v-if="displayLatestChanges && latestChangesMessage"
|
|
82
|
-
class="el-icon-warning message-icon latest-changesicon"
|
|
83
|
+
class="el-icon-warning message-icon latest-changesicon control-layer"
|
|
83
84
|
@mouseover="showHelpText(8)"
|
|
84
85
|
@mouseout="hideHelpText(8)"
|
|
85
86
|
>
|
|
@@ -100,6 +101,7 @@
|
|
|
100
101
|
>
|
|
101
102
|
<template #reference>
|
|
102
103
|
<ScaffoldTreeControls
|
|
104
|
+
class="control-layer"
|
|
103
105
|
ref="scaffoldTreeControls"
|
|
104
106
|
:isReady="isReady"
|
|
105
107
|
:show-colour-picker="enableColourPicker"
|
|
@@ -111,6 +113,7 @@
|
|
|
111
113
|
</el-popover>
|
|
112
114
|
<div class="primitive-controls-box">
|
|
113
115
|
<primitive-controls
|
|
116
|
+
class="control-layer"
|
|
114
117
|
ref="primitiveControls"
|
|
115
118
|
:createData="createData"
|
|
116
119
|
:viewingMode="viewingMode"
|
|
@@ -132,7 +135,7 @@
|
|
|
132
135
|
<template #reference>
|
|
133
136
|
<div
|
|
134
137
|
v-if="timeVarying"
|
|
135
|
-
class="time-slider-container"
|
|
138
|
+
class="time-slider-container control-layer"
|
|
136
139
|
:class="[minimisedSlider ? 'minimised' : '', sliderPosition]"
|
|
137
140
|
>
|
|
138
141
|
<el-tabs type="card">
|
|
@@ -201,7 +204,7 @@
|
|
|
201
204
|
</div>
|
|
202
205
|
</template>
|
|
203
206
|
</el-popover>
|
|
204
|
-
<div class="bottom-right-control">
|
|
207
|
+
<div class="bottom-right-control control-layer">
|
|
205
208
|
<el-popover
|
|
206
209
|
:visible="hoverVisibilities[0].value"
|
|
207
210
|
content="Zoom in"
|
|
@@ -298,7 +301,7 @@
|
|
|
298
301
|
popper-class="background-popper non-selectable h-auto"
|
|
299
302
|
virtual-triggering
|
|
300
303
|
>
|
|
301
|
-
<div>
|
|
304
|
+
<div class="control-layer">
|
|
302
305
|
<el-row class="backgroundText">Viewing Mode</el-row>
|
|
303
306
|
<el-row class="backgroundControl">
|
|
304
307
|
<div style="margin-bottom: 2px;">
|
|
@@ -362,7 +365,7 @@
|
|
|
362
365
|
</div>
|
|
363
366
|
</el-popover>
|
|
364
367
|
<div
|
|
365
|
-
class="settings-group"
|
|
368
|
+
class="settings-group control-layer"
|
|
366
369
|
:class="{ open: drawerOpen, close: !drawerOpen }"
|
|
367
370
|
>
|
|
368
371
|
<el-row v-if="showOpenMapButton">
|
|
@@ -2911,6 +2914,10 @@ export default {
|
|
|
2911
2914
|
}
|
|
2912
2915
|
}
|
|
2913
2916
|
|
|
2917
|
+
.control-layer {
|
|
2918
|
+
z-index: 2;
|
|
2919
|
+
}
|
|
2920
|
+
|
|
2914
2921
|
.time-slider-container {
|
|
2915
2922
|
text-align: left;
|
|
2916
2923
|
position: absolute;
|