@abi-software/scaffoldvuer 1.13.1-beta.9 → 1.14.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 +12356 -11935
- package/dist/scaffoldvuer.umd.cjs +176 -176
- package/dist/style.css +1 -1
- package/package.json +3 -3
- package/src/components/OpacityControls.vue +0 -1
- package/src/components/PrimitiveControls.vue +45 -113
- package/src/components/ScaffoldTooltip.vue +2 -47
- package/src/components/ScaffoldTreeControls.vue +80 -34
- package/src/components/ScaffoldVuer.vue +58 -18
- package/src/components/TextureSlidesControls.vue +24 -3
- package/src/components/TransformationControls.vue +4 -2
- package/src/components.d.ts +1 -1
- package/src/scripts/Utilities.js +10 -11
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abi-software/scaffoldvuer",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.14.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": "
|
|
44
|
+
"@abi-software/map-utilities": "1.8.0",
|
|
45
45
|
"@abi-software/sparc-annotation": "^0.3.2",
|
|
46
46
|
"@abi-software/svg-sprite": "1.0.3",
|
|
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.16.
|
|
56
|
+
"zincjs": "^1.16.10"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"@babel/eslint-parser": "^7.28.0",
|
|
@@ -1,52 +1,39 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
3
|
-
v-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
:usageConfig="usageConfig"
|
|
38
|
-
@primitivesUpdated="$emit('primitivesUpdated', $event)"
|
|
39
|
-
/>
|
|
40
|
-
</el-collapse-item>
|
|
41
|
-
</el-collapse>
|
|
42
|
-
</div>
|
|
43
|
-
<div
|
|
44
|
-
class="drawer-button"
|
|
45
|
-
:class="{ open: drawerOpen, close: !drawerOpen }"
|
|
46
|
-
@click="toggleDrawer"
|
|
47
|
-
>
|
|
48
|
-
<el-icon><el-icon-arrow-right /></el-icon>
|
|
49
|
-
</div>
|
|
2
|
+
<div v-show="hasValidPrimitive" class="my-drawer">
|
|
3
|
+
<el-collapse class="collapse" v-model="activeName" accordion>
|
|
4
|
+
<el-collapse-item title="Opacity" name="oControls" v-show="!isTextureSlides" >
|
|
5
|
+
<opacity-controls
|
|
6
|
+
:material="material"
|
|
7
|
+
:zincObject="zincObject"
|
|
8
|
+
ref="opacityControls" />
|
|
9
|
+
</el-collapse-item>
|
|
10
|
+
<el-collapse-item v-show="!isEditable" title="Transformation" name="trControls">
|
|
11
|
+
<transformation-controls
|
|
12
|
+
class="transformation-controls"
|
|
13
|
+
ref="transformationControls" />
|
|
14
|
+
</el-collapse-item>
|
|
15
|
+
<el-collapse-item v-show="isTextureSlides" title="Texture Slides" name="tsControls">
|
|
16
|
+
<texture-slides-controls
|
|
17
|
+
class="texture-controls"
|
|
18
|
+
ref="tSlidesControls" />
|
|
19
|
+
</el-collapse-item>
|
|
20
|
+
<el-collapse-item v-show="isPointset" title="Points" name="pControls">
|
|
21
|
+
<points-controls
|
|
22
|
+
class="pointset-controls"
|
|
23
|
+
ref="pointsetControls"
|
|
24
|
+
@primitivesUpdated="$emit('primitivesUpdated', $event)"
|
|
25
|
+
/>
|
|
26
|
+
</el-collapse-item>
|
|
27
|
+
<el-collapse-item v-show="isLines" title="Lines" name="lControls">
|
|
28
|
+
<lines-controls
|
|
29
|
+
class="lines-controls"
|
|
30
|
+
ref="linesControls"
|
|
31
|
+
:createData="createData"
|
|
32
|
+
:usageConfig="usageConfig"
|
|
33
|
+
@primitivesUpdated="$emit('primitivesUpdated', $event)"
|
|
34
|
+
/>
|
|
35
|
+
</el-collapse-item>
|
|
36
|
+
</el-collapse>
|
|
50
37
|
</div>
|
|
51
38
|
</template>
|
|
52
39
|
|
|
@@ -101,7 +88,7 @@ export default {
|
|
|
101
88
|
isTextureSlides: false,
|
|
102
89
|
isPointset: false,
|
|
103
90
|
isLines: false,
|
|
104
|
-
|
|
91
|
+
|
|
105
92
|
zincObject: undefined,
|
|
106
93
|
isEditable: false,
|
|
107
94
|
displayString: "100%"
|
|
@@ -120,9 +107,6 @@ export default {
|
|
|
120
107
|
this.displayString = Math.floor(100 * val + 0.5) + "%";
|
|
121
108
|
return this.displayString;
|
|
122
109
|
},
|
|
123
|
-
toggleDrawer: function() {
|
|
124
|
-
this.drawerOpen = !this.drawerOpen;
|
|
125
|
-
},
|
|
126
110
|
setObject: function(object) {
|
|
127
111
|
if (object) {
|
|
128
112
|
this.zincObject = markRaw(object);
|
|
@@ -143,7 +127,7 @@ export default {
|
|
|
143
127
|
this.isPointset = true;
|
|
144
128
|
this.$refs.pointsetControls.setObject(object);
|
|
145
129
|
this.activeName = "pControls";
|
|
146
|
-
} else if (object.isLines2 || (object.isTubeLines &&
|
|
130
|
+
} else if (object.isLines2 || (object.isTubeLines &&
|
|
147
131
|
this.usageConfig?.showTubeLinesControls)) {
|
|
148
132
|
this.isLines = true;
|
|
149
133
|
this.$refs.linesControls.setObject(object);
|
|
@@ -163,72 +147,20 @@ export default {
|
|
|
163
147
|
|
|
164
148
|
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
|
165
149
|
<style scoped lang="scss">
|
|
166
|
-
.primitive-controls {
|
|
167
|
-
position: absolute;
|
|
168
|
-
bottom: 30%;
|
|
169
|
-
transition: all 1s ease;
|
|
170
|
-
|
|
171
|
-
&.open {
|
|
172
|
-
right: 0px;
|
|
173
|
-
.my-drawer {
|
|
174
|
-
opacity: 1;
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
&.close {
|
|
178
|
-
right: -250px;
|
|
179
|
-
.my-drawer {
|
|
180
|
-
pointer-events: none;
|
|
181
|
-
opacity: 0;
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
150
|
.my-drawer {
|
|
186
|
-
transition: all 1s ease;
|
|
187
|
-
float: right;
|
|
188
|
-
max-height: 150px;
|
|
189
|
-
text-align: left;
|
|
190
|
-
background: #ffffff;
|
|
191
|
-
width:250px;
|
|
192
151
|
.collapse {
|
|
193
|
-
border:
|
|
194
|
-
:
|
|
195
|
-
padding-left: 8px;
|
|
196
|
-
}
|
|
197
|
-
:deep(.el-collapse-item__content) {
|
|
198
|
-
padding-bottom: 8px;
|
|
199
|
-
}
|
|
152
|
+
border-top: none;
|
|
153
|
+
border-bottom: none;
|
|
200
154
|
}
|
|
201
|
-
}
|
|
202
155
|
|
|
203
|
-
.
|
|
204
|
-
|
|
205
|
-
width: 20px;
|
|
206
|
-
height: 40px;
|
|
207
|
-
z-index: 8;
|
|
208
|
-
border: solid 1px $app-primary-color;
|
|
209
|
-
background-color: #f9f2fc;
|
|
210
|
-
text-align: center;
|
|
211
|
-
vertical-align: middle;
|
|
212
|
-
cursor: pointer;
|
|
213
|
-
pointer-events: auto;
|
|
214
|
-
margin-top: 25px;
|
|
215
|
-
|
|
216
|
-
i {
|
|
217
|
-
font-weight: 600;
|
|
218
|
-
margin-top: 12px;
|
|
219
|
-
color: $app-primary-color;
|
|
220
|
-
transition-delay: 0.9s;
|
|
221
|
-
}
|
|
222
|
-
&.open {
|
|
223
|
-
i {
|
|
224
|
-
transform: rotate(0deg) scaleY(2.5);
|
|
225
|
-
}
|
|
156
|
+
:deep(.el-collapse-item__header) {
|
|
157
|
+
height:36px;
|
|
226
158
|
}
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
}
|
|
159
|
+
|
|
160
|
+
:deep(.el-collapse-item__content) {
|
|
161
|
+
padding-bottom: 0px;
|
|
231
162
|
}
|
|
232
163
|
}
|
|
233
164
|
|
|
165
|
+
|
|
234
166
|
</style>
|
|
@@ -32,28 +32,6 @@
|
|
|
32
32
|
:annotationEntry="annotationEntry"
|
|
33
33
|
@annotation="$emit('confirm-comment', $event)"
|
|
34
34
|
/>
|
|
35
|
-
<div v-if="createData.toBeDeleted" class="delete-container">
|
|
36
|
-
<el-row>
|
|
37
|
-
<el-col :span="10">Delete this feature?</el-col>
|
|
38
|
-
<el-col :span="7">
|
|
39
|
-
<el-button
|
|
40
|
-
class="delete-button"
|
|
41
|
-
:icon="ElIconDelete"
|
|
42
|
-
@click="$emit('confirm-delete')"
|
|
43
|
-
>
|
|
44
|
-
Delete
|
|
45
|
-
</el-button>
|
|
46
|
-
</el-col>
|
|
47
|
-
<el-col :span="6">
|
|
48
|
-
<el-button
|
|
49
|
-
class="delete-button"
|
|
50
|
-
@click="$emit('cancel-create')"
|
|
51
|
-
>
|
|
52
|
-
Dismiss
|
|
53
|
-
</el-button>
|
|
54
|
-
</el-col>
|
|
55
|
-
</el-row>
|
|
56
|
-
</div>
|
|
57
35
|
</template>
|
|
58
36
|
</el-popover>
|
|
59
37
|
</div>
|
|
@@ -68,9 +46,6 @@ import {
|
|
|
68
46
|
ElPopover as Popover,
|
|
69
47
|
ElRow as Row,
|
|
70
48
|
} from "element-plus";
|
|
71
|
-
import {
|
|
72
|
-
Delete as ElIconDelete,
|
|
73
|
-
} from '@element-plus/icons-vue'
|
|
74
49
|
import { mapState } from 'pinia';
|
|
75
50
|
import { useMainStore } from "@/store/index";
|
|
76
51
|
import { CreateTooltipContent, Tooltip } from '@abi-software/map-utilities'
|
|
@@ -84,7 +59,6 @@ export default {
|
|
|
84
59
|
components: {
|
|
85
60
|
Col,
|
|
86
61
|
CreateTooltipContent,
|
|
87
|
-
ElIconDelete,
|
|
88
62
|
Icon,
|
|
89
63
|
Popover,
|
|
90
64
|
Row,
|
|
@@ -143,8 +117,7 @@ export default {
|
|
|
143
117
|
data: function () {
|
|
144
118
|
return {
|
|
145
119
|
display: false,
|
|
146
|
-
annotationEntry: []
|
|
147
|
-
ElIconDelete: shallowRef(ElIconDelete),
|
|
120
|
+
annotationEntry: []
|
|
148
121
|
};
|
|
149
122
|
},
|
|
150
123
|
computed: {
|
|
@@ -211,7 +184,7 @@ export default {
|
|
|
211
184
|
.region-tooltip {
|
|
212
185
|
position: absolute;
|
|
213
186
|
height: 50px;
|
|
214
|
-
z-index:
|
|
187
|
+
z-index: 3;
|
|
215
188
|
:deep(.tooltip-popper.el-popover.el-popper) {
|
|
216
189
|
padding: 2px 6px;
|
|
217
190
|
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
|
|
@@ -254,23 +227,5 @@ export default {
|
|
|
254
227
|
display:none;
|
|
255
228
|
}
|
|
256
229
|
}
|
|
257
|
-
|
|
258
|
-
.delete-container {
|
|
259
|
-
margin-top: 12px;
|
|
260
|
-
margin-bottom: 12px;
|
|
261
|
-
font-size: 14px;
|
|
262
|
-
.delete-button {
|
|
263
|
-
pointer-events: auto;
|
|
264
|
-
cursor: pointer;
|
|
265
|
-
margin-left:8px;
|
|
266
|
-
padding-left: 8px;
|
|
267
|
-
padding-right: 8px;
|
|
268
|
-
height: 24px !important;
|
|
269
|
-
color: $app-primary-color;
|
|
270
|
-
&:hover {
|
|
271
|
-
background-color: var(--el-color-primary-light-9);
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
230
|
}
|
|
276
231
|
</style>
|
|
@@ -1,26 +1,30 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="tree-controls" :class="{ open: drawerOpen, close: !drawerOpen }">
|
|
3
|
-
<div class="
|
|
4
|
-
<
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
3
|
+
<div class="tree-controls-scroll">
|
|
4
|
+
<div class="tree-controls-container"
|
|
5
|
+
:style="{ 'max-height': `${maxHeight}px` }">
|
|
6
|
+
<slot name="treeSlot"></slot>
|
|
7
|
+
<TreeControls
|
|
8
|
+
mapType="scaffold"
|
|
9
|
+
title="Regions"
|
|
10
|
+
:isReady="isReady"
|
|
11
|
+
:treeData="treeDataEntry"
|
|
12
|
+
:active="active"
|
|
13
|
+
:hover="hover"
|
|
14
|
+
:showColourPicker="showColourPicker"
|
|
15
|
+
@setColour="setColour"
|
|
16
|
+
@checkChanged="checkChanged"
|
|
17
|
+
@changeActive="changeActiveByNode"
|
|
18
|
+
@changeHover="changeHoverByNode"
|
|
19
|
+
ref="treeControls"
|
|
20
|
+
@mouseleave="removeHover(true)"
|
|
21
|
+
/>
|
|
22
|
+
</div>
|
|
20
23
|
</div>
|
|
21
24
|
<div
|
|
22
25
|
class="drawer-button"
|
|
23
26
|
:class="{ open: drawerOpen, close: !drawerOpen }"
|
|
27
|
+
:style="{ 'bottom': `${drawerBottom}px` }"
|
|
24
28
|
@click="toggleDrawer"
|
|
25
29
|
>
|
|
26
30
|
<el-icon><el-icon-arrow-left /></el-icon>
|
|
@@ -63,11 +67,12 @@ export default {
|
|
|
63
67
|
TreeControls,
|
|
64
68
|
},
|
|
65
69
|
props: {
|
|
70
|
+
containerHeight: Number,
|
|
71
|
+
isReady: Boolean,
|
|
66
72
|
/**
|
|
67
73
|
* Enable/disable colour picker
|
|
68
74
|
*/
|
|
69
75
|
showColourPicker: Boolean,
|
|
70
|
-
isReady: Boolean,
|
|
71
76
|
},
|
|
72
77
|
data: function () {
|
|
73
78
|
return {
|
|
@@ -83,6 +88,19 @@ export default {
|
|
|
83
88
|
};
|
|
84
89
|
},
|
|
85
90
|
computed: {
|
|
91
|
+
drawerBottom: function() {
|
|
92
|
+
if (100 > this.maxHeight) {
|
|
93
|
+
return this.maxHeight;
|
|
94
|
+
}
|
|
95
|
+
return 100;
|
|
96
|
+
},
|
|
97
|
+
maxHeight: function() {
|
|
98
|
+
let height = this.containerHeight - 114;
|
|
99
|
+
if (0 > height) {
|
|
100
|
+
height = 0;
|
|
101
|
+
}
|
|
102
|
+
return height;
|
|
103
|
+
},
|
|
86
104
|
treeDataEntry: function () {
|
|
87
105
|
return this.treeData[0].children;
|
|
88
106
|
},
|
|
@@ -111,21 +129,23 @@ export default {
|
|
|
111
129
|
*/
|
|
112
130
|
},
|
|
113
131
|
methods: {
|
|
114
|
-
setCheckboxDisabled: function(data, flag,
|
|
132
|
+
setCheckboxDisabled: function(data, flag, childrenOnly) {
|
|
115
133
|
if (data) {
|
|
116
|
-
|
|
117
|
-
|
|
134
|
+
if (!childrenOnly) {
|
|
135
|
+
data.disabled = flag;
|
|
136
|
+
}
|
|
137
|
+
if (data.children) {
|
|
118
138
|
data.children.forEach(child =>
|
|
119
|
-
this.setCheckboxDisabled(child, flag,
|
|
139
|
+
this.setCheckboxDisabled(child, flag, false)
|
|
120
140
|
);
|
|
121
141
|
}
|
|
122
142
|
}
|
|
123
143
|
},
|
|
124
|
-
setRegionCheckboxDisabled: function (region, flag) {
|
|
144
|
+
setRegionCheckboxDisabled: function (region, flag, childrenOnly) {
|
|
125
145
|
if (this.treeData[0] && region?.uuid) {
|
|
126
146
|
const data = this.findDataWithId(this.treeData[0], region?.uuid)
|
|
127
147
|
if (data) {
|
|
128
|
-
this.setCheckboxDisabled(data, flag,
|
|
148
|
+
this.setCheckboxDisabled(data, flag, childrenOnly);
|
|
129
149
|
}
|
|
130
150
|
}
|
|
131
151
|
},
|
|
@@ -283,6 +303,7 @@ export default {
|
|
|
283
303
|
region.hideAllPrimitives();
|
|
284
304
|
//this.checkedRegions = this.checkedRegions.filter(region => region.label !== node.label);
|
|
285
305
|
}
|
|
306
|
+
this.$emit("check-changed", {region, isChecked});
|
|
286
307
|
}
|
|
287
308
|
if (isPrimitives) {
|
|
288
309
|
const primitives = region.findObjectsWithGroupName(node.label);
|
|
@@ -290,6 +311,7 @@ export default {
|
|
|
290
311
|
const visibility = isChecked && !node.disabled;
|
|
291
312
|
primitive.setVisibility(visibility);
|
|
292
313
|
});
|
|
314
|
+
this.$emit("check-changed", {zincObjects: primitives, isChecked});
|
|
293
315
|
}
|
|
294
316
|
},
|
|
295
317
|
updateActiveUI: function (primitives) {
|
|
@@ -669,45 +691,69 @@ export default {
|
|
|
669
691
|
}
|
|
670
692
|
&.open {
|
|
671
693
|
left: 0px;
|
|
672
|
-
.
|
|
694
|
+
.tree-controls-container {
|
|
673
695
|
opacity: 1;
|
|
674
696
|
}
|
|
675
697
|
}
|
|
676
698
|
&.close {
|
|
677
|
-
left: -
|
|
678
|
-
.
|
|
699
|
+
left: -278px;
|
|
700
|
+
.tree-controls-container {
|
|
679
701
|
pointer-events: none;
|
|
680
702
|
opacity: 0;
|
|
681
703
|
}
|
|
682
704
|
}
|
|
683
705
|
}
|
|
684
706
|
|
|
685
|
-
.
|
|
707
|
+
.tree-controls-container {
|
|
686
708
|
transition: all 1s ease;
|
|
687
709
|
float: left;
|
|
688
|
-
padding-left:
|
|
689
|
-
padding-right:
|
|
690
|
-
max-height: calc(100% - 154px);
|
|
710
|
+
padding-left: 8px;
|
|
711
|
+
padding-right: 8px;
|
|
691
712
|
text-align: left;
|
|
692
|
-
overflow: none;
|
|
693
713
|
border: 1px solid rgb(220, 223, 230);
|
|
694
|
-
padding-top: 7px;
|
|
695
714
|
padding-bottom: 16px;
|
|
696
715
|
background: #ffffff;
|
|
697
716
|
}
|
|
698
717
|
|
|
718
|
+
.tree-controls-scroll {
|
|
719
|
+
overflow-y:auto;
|
|
720
|
+
overflow-x:hidden;
|
|
721
|
+
//scrollbar-width: thin;
|
|
722
|
+
|
|
723
|
+
&:hover {
|
|
724
|
+
&::-webkit-scrollbar-track {
|
|
725
|
+
background: #f1f1f1;
|
|
726
|
+
}
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
&::-webkit-scrollbar-track {
|
|
730
|
+
border-radius: 8px; /* Rounded corners for the track */
|
|
731
|
+
|
|
732
|
+
}
|
|
733
|
+
&::-webkit-scrollbar {
|
|
734
|
+
width:4px;
|
|
735
|
+
|
|
736
|
+
}
|
|
737
|
+
&::-webkit-scrollbar-thumb {
|
|
738
|
+
border-radius: 10px;
|
|
739
|
+
box-shadow: inset 0 0 6px #c0c4cc;
|
|
740
|
+
background: #a1a1a1;
|
|
741
|
+
}
|
|
742
|
+
}
|
|
743
|
+
|
|
699
744
|
.drawer-button {
|
|
745
|
+
position: absolute;
|
|
700
746
|
float: left;
|
|
701
747
|
width: 20px;
|
|
702
748
|
height: 40px;
|
|
703
749
|
z-index: 8;
|
|
704
|
-
margin-top: calc(50% - 52px);
|
|
705
750
|
border: solid 1px $app-primary-color;
|
|
706
751
|
background-color: #f9f2fc;
|
|
707
752
|
text-align: center;
|
|
708
753
|
vertical-align: middle;
|
|
709
754
|
cursor: pointer;
|
|
710
755
|
pointer-events: auto;
|
|
756
|
+
right: -22px;
|
|
711
757
|
}
|
|
712
758
|
|
|
713
759
|
.drawer-button {
|