@abi-software/scaffoldvuer 1.13.1-beta.12 → 1.13.1-beta.13
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 +1385 -1391
- package/dist/scaffoldvuer.umd.cjs +18 -18
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/OpacityControls.vue +0 -1
- package/src/components/PrimitiveControls.vue +45 -113
- package/src/components/ScaffoldTreeControls.vue +70 -28
- package/src/components/ScaffoldVuer.vue +26 -11
- package/src/components/TextureSlidesControls.vue +3 -2
- package/src/components/TransformationControls.vue +4 -2
- package/src/components.d.ts +0 -1
package/package.json
CHANGED
|
@@ -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>
|
|
@@ -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
|
},
|
|
@@ -673,45 +691,69 @@ export default {
|
|
|
673
691
|
}
|
|
674
692
|
&.open {
|
|
675
693
|
left: 0px;
|
|
676
|
-
.
|
|
694
|
+
.tree-controls-container {
|
|
677
695
|
opacity: 1;
|
|
678
696
|
}
|
|
679
697
|
}
|
|
680
698
|
&.close {
|
|
681
|
-
left: -
|
|
682
|
-
.
|
|
699
|
+
left: -278px;
|
|
700
|
+
.tree-controls-container {
|
|
683
701
|
pointer-events: none;
|
|
684
702
|
opacity: 0;
|
|
685
703
|
}
|
|
686
704
|
}
|
|
687
705
|
}
|
|
688
706
|
|
|
689
|
-
.
|
|
707
|
+
.tree-controls-container {
|
|
690
708
|
transition: all 1s ease;
|
|
691
709
|
float: left;
|
|
692
|
-
padding-left:
|
|
693
|
-
padding-right:
|
|
694
|
-
max-height: calc(100% - 154px);
|
|
710
|
+
padding-left: 8px;
|
|
711
|
+
padding-right: 8px;
|
|
695
712
|
text-align: left;
|
|
696
|
-
overflow: none;
|
|
697
713
|
border: 1px solid rgb(220, 223, 230);
|
|
698
|
-
padding-top: 7px;
|
|
699
714
|
padding-bottom: 16px;
|
|
700
715
|
background: #ffffff;
|
|
701
716
|
}
|
|
702
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
|
+
|
|
703
744
|
.drawer-button {
|
|
745
|
+
position: absolute;
|
|
704
746
|
float: left;
|
|
705
747
|
width: 20px;
|
|
706
748
|
height: 40px;
|
|
707
749
|
z-index: 8;
|
|
708
|
-
margin-top: calc(50% - 52px);
|
|
709
750
|
border: solid 1px $app-primary-color;
|
|
710
751
|
background-color: #f9f2fc;
|
|
711
752
|
text-align: center;
|
|
712
753
|
vertical-align: middle;
|
|
713
754
|
cursor: pointer;
|
|
714
755
|
pointer-events: auto;
|
|
756
|
+
right: -22px;
|
|
715
757
|
}
|
|
716
758
|
|
|
717
759
|
.drawer-button {
|
|
@@ -106,6 +106,7 @@
|
|
|
106
106
|
class="control-layer"
|
|
107
107
|
ref="scaffoldTreeControls"
|
|
108
108
|
:isReady="isReady"
|
|
109
|
+
:containerHeight="clientHeight"
|
|
109
110
|
:show-colour-picker="enableColourPicker"
|
|
110
111
|
@object-selected="objectSelected"
|
|
111
112
|
@object-hovered="objectHovered"
|
|
@@ -114,20 +115,31 @@
|
|
|
114
115
|
>
|
|
115
116
|
<template v-slot:treeSlot>
|
|
116
117
|
<slot name="treeSlot"></slot>
|
|
118
|
+
<primitive-controls
|
|
119
|
+
class="control-layer"
|
|
120
|
+
ref="primitiveControls"
|
|
121
|
+
:createData="createData"
|
|
122
|
+
:viewingMode="viewingMode"
|
|
123
|
+
:usageConfig="usageConfig"
|
|
124
|
+
@primitivesUpdated="primitivesUpdated"
|
|
125
|
+
/>
|
|
117
126
|
</template>
|
|
118
127
|
</ScaffoldTreeControls>
|
|
119
128
|
</template>
|
|
120
129
|
</el-popover>
|
|
121
|
-
|
|
122
|
-
<primitive-controls
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
130
|
+
<!--
|
|
131
|
+
<div class="primitive-controls-box">
|
|
132
|
+
|
|
133
|
+
<primitive-controls
|
|
134
|
+
class="control-layer"
|
|
135
|
+
ref="primitiveControls"
|
|
136
|
+
:createData="createData"
|
|
137
|
+
:viewingMode="viewingMode"
|
|
138
|
+
:usageConfig="usageConfig"
|
|
139
|
+
@primitivesUpdated="primitivesUpdated"
|
|
140
|
+
/>
|
|
141
|
+
</div>
|
|
142
|
+
-->
|
|
131
143
|
<el-popover
|
|
132
144
|
v-if="timeVarying"
|
|
133
145
|
ref="sliderPopover"
|
|
@@ -827,6 +839,7 @@ export default {
|
|
|
827
839
|
data: function () {
|
|
828
840
|
return {
|
|
829
841
|
annotator: undefined,
|
|
842
|
+
clientHeight: 300,
|
|
830
843
|
colourRadio: true,
|
|
831
844
|
createData: {
|
|
832
845
|
drawingBox: false,
|
|
@@ -1060,6 +1073,7 @@ export default {
|
|
|
1060
1073
|
this.$module.addOrganPartRemovedCallback(this.zincObjectRemoved);
|
|
1061
1074
|
this.$module.initialiseRenderer(this.$refs.display);
|
|
1062
1075
|
this.toggleRendering(this.render);
|
|
1076
|
+
this.clientHeight = this.$refs.scaffoldContainer.$el.clientHeight;
|
|
1063
1077
|
this.ro = new ResizeObserver(this.adjustLayout).observe(
|
|
1064
1078
|
this.$refs.scaffoldContainer.$el
|
|
1065
1079
|
);
|
|
@@ -3010,6 +3024,7 @@ export default {
|
|
|
3010
3024
|
adjustLayout: function () {
|
|
3011
3025
|
if (this.$refs.scaffoldContainer?.$el) {
|
|
3012
3026
|
let width = this.$refs.scaffoldContainer.$el.clientWidth;
|
|
3027
|
+
this.clientHeight = this.$refs.scaffoldContainer.$el.clientHeight;
|
|
3013
3028
|
this.minimisedSlider = width < 812;
|
|
3014
3029
|
if (this.minimisedSlider) {
|
|
3015
3030
|
this.sliderPosition = this.drawerOpen ? "right" : "left";
|
|
@@ -3276,7 +3291,7 @@ export default {
|
|
|
3276
3291
|
transition: all 1s ease;
|
|
3277
3292
|
|
|
3278
3293
|
&.open {
|
|
3279
|
-
left:
|
|
3294
|
+
left: 302px;
|
|
3280
3295
|
}
|
|
3281
3296
|
|
|
3282
3297
|
&.close {
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
<el-slider
|
|
75
75
|
v-model="slide.value"
|
|
76
76
|
class="my-slider"
|
|
77
|
-
:step="0.
|
|
77
|
+
:step="0.001"
|
|
78
78
|
:min="0"
|
|
79
79
|
:max="1"
|
|
80
80
|
:show-tooltip="false"
|
|
@@ -84,7 +84,8 @@
|
|
|
84
84
|
<el-col :offset="0" :span="6">
|
|
85
85
|
<el-input-number
|
|
86
86
|
v-model="slide.value"
|
|
87
|
-
|
|
87
|
+
@change="modifySlide(slide)"
|
|
88
|
+
:step="0.001"
|
|
88
89
|
:min="0"
|
|
89
90
|
:max="1"
|
|
90
91
|
:controls="false"
|
|
@@ -159,6 +159,7 @@ export default {
|
|
|
159
159
|
calculateMinAndMax: function() {
|
|
160
160
|
if (this.zincObject) {
|
|
161
161
|
const originalPos = this.zincObject?.userData?.originalPos;
|
|
162
|
+
const morph = this.zincObject.getGroup();
|
|
162
163
|
if (originalPos && this.boundingDims) {
|
|
163
164
|
this.min = [
|
|
164
165
|
originalPos[0] - this.boundingDims.size[0],
|
|
@@ -215,7 +216,8 @@ export default {
|
|
|
215
216
|
.slides-block {
|
|
216
217
|
pointer-events: auto;
|
|
217
218
|
&.el-main {
|
|
218
|
-
padding:
|
|
219
|
+
padding: 0px 4px 8px 4px;
|
|
220
|
+
overflow: unset;
|
|
219
221
|
&::-webkit-scrollbar {
|
|
220
222
|
width: 10px;
|
|
221
223
|
}
|
|
@@ -263,7 +265,7 @@ export default {
|
|
|
263
265
|
.tool-row {
|
|
264
266
|
align-items:center;
|
|
265
267
|
text-align: center;
|
|
266
|
-
padding-top:
|
|
268
|
+
padding-top:4px;
|
|
267
269
|
}
|
|
268
270
|
|
|
269
271
|
</style>
|
package/src/components.d.ts
CHANGED
|
@@ -16,7 +16,6 @@ declare module 'vue' {
|
|
|
16
16
|
ElFooter: typeof import('element-plus/es')['ElFooter']
|
|
17
17
|
ElIcon: typeof import('element-plus/es')['ElIcon']
|
|
18
18
|
ElIconArrowLeft: typeof import('@element-plus/icons-vue')['ArrowLeft']
|
|
19
|
-
ElIconArrowRight: typeof import('@element-plus/icons-vue')['ArrowRight']
|
|
20
19
|
ElIconDelete: typeof import('@element-plus/icons-vue')['Delete']
|
|
21
20
|
ElIconPlus: typeof import('@element-plus/icons-vue')['Plus']
|
|
22
21
|
ElIconWarningFilled: typeof import('@element-plus/icons-vue')['WarningFilled']
|