@abi-software/scaffoldvuer 1.13.1-beta.13 → 1.13.1-beta.15
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 +11640 -11223
- package/dist/scaffoldvuer.umd.cjs +174 -174
- package/dist/style.css +1 -1
- package/package.json +3 -3
- package/src/components/ScaffoldTooltip.vue +1 -46
- package/src/components/ScaffoldVuer.vue +28 -5
- package/src/components/TextureSlidesControls.vue +21 -1
- package/src/components.d.ts +1 -0
- 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.13.1-beta.
|
|
3
|
+
"version": "1.13.1-beta.15",
|
|
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.7.8-beta.3",
|
|
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",
|
|
@@ -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: {
|
|
@@ -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>
|
|
@@ -1457,6 +1457,9 @@ export default {
|
|
|
1457
1457
|
this.renameAnnotations(payload.region, payload.group,
|
|
1458
1458
|
this._editingZincObject, oldGroupName);
|
|
1459
1459
|
}
|
|
1460
|
+
else if (payload.deleting) {
|
|
1461
|
+
this.confirmDelete();
|
|
1462
|
+
}
|
|
1460
1463
|
if (object) {
|
|
1461
1464
|
this.addAndEditAnnotations(payload.region, payload.group, object.zincObject, "Create");
|
|
1462
1465
|
object.zincObject.isEditable = true;
|
|
@@ -1535,6 +1538,12 @@ export default {
|
|
|
1535
1538
|
this.offlineAnnotations = this.offlineAnnotations.filter(offline => offline.item.id !== annotation.item.id);
|
|
1536
1539
|
sessionStorage.setItem('anonymous-annotation', JSON.stringify(this.offlineAnnotations));
|
|
1537
1540
|
}
|
|
1541
|
+
this.$emit('userPrimitivesUpdated', {
|
|
1542
|
+
region,
|
|
1543
|
+
group,
|
|
1544
|
+
zincObject: this._editingZincObject,
|
|
1545
|
+
deleted: true
|
|
1546
|
+
});
|
|
1538
1547
|
}
|
|
1539
1548
|
}
|
|
1540
1549
|
this.cancelCreate();
|
|
@@ -1840,6 +1849,21 @@ export default {
|
|
|
1840
1849
|
setTimeout(this.stopFreeSpin, 4000);
|
|
1841
1850
|
}
|
|
1842
1851
|
},
|
|
1852
|
+
activateDeleteMode: function(eventIdentifiers) {
|
|
1853
|
+
const zincObject = getDeletableObjects(eventIdentifiers);
|
|
1854
|
+
if (zincObject) {
|
|
1855
|
+
this._editingZincObject = zincObject;
|
|
1856
|
+
this.createData.faceIndex = -1;
|
|
1857
|
+
this.createData.editingIndex = -1;
|
|
1858
|
+
this.createData.renaming = false;
|
|
1859
|
+
this.createData.tempGroupName = this._editingZincObject.groupName;
|
|
1860
|
+
this.createData.regionPrefix = this._editingZincObject.region.getFullPath();
|
|
1861
|
+
this.createData.toBeConfirmed = true;
|
|
1862
|
+
this.createData.toBeDeleted = true;
|
|
1863
|
+
this.tData.x = 50;
|
|
1864
|
+
this.tData.y = 200;
|
|
1865
|
+
}
|
|
1866
|
+
},
|
|
1843
1867
|
activateEditingMode: function(eventIdentifiers) {
|
|
1844
1868
|
let editing = getEditablePoint(eventIdentifiers);
|
|
1845
1869
|
if (editing) {
|
|
@@ -1866,6 +1890,7 @@ export default {
|
|
|
1866
1890
|
this.createData.tempGroupName = this._editingZincObject.groupName;
|
|
1867
1891
|
this.createData.regionPrefix = this._editingZincObject.region.getFullPath();
|
|
1868
1892
|
this.createData.toBeConfirmed = true;
|
|
1893
|
+
this.createData.toBeDeleted = false;
|
|
1869
1894
|
this.showRegionTooltipWithAnnotations(eventIdentifiers, false, false);
|
|
1870
1895
|
this.tData.x = 50;
|
|
1871
1896
|
this.tData.y = 200;
|
|
@@ -1886,11 +1911,7 @@ export default {
|
|
|
1886
1911
|
if (this.activeDrawMode === "Edit") {
|
|
1887
1912
|
this.activateEditingMode(event.identifiers);
|
|
1888
1913
|
} else if (this.activeDrawMode === "Delete") {
|
|
1889
|
-
|
|
1890
|
-
if (zincObject) {
|
|
1891
|
-
this.createData.toBeDeleted = true;
|
|
1892
|
-
this._editingZincObject = zincObject;
|
|
1893
|
-
}
|
|
1914
|
+
this.activateDeleteMode(event.identifiers);
|
|
1894
1915
|
}
|
|
1895
1916
|
if (this.activeDrawMode !== "Point" && this.activeDrawMode !== "LineString") {
|
|
1896
1917
|
this.showRegionTooltipWithAnnotations(event.identifiers, true, false);
|
|
@@ -1906,6 +1927,7 @@ export default {
|
|
|
1906
1927
|
this._editingZincObject = zincObject;
|
|
1907
1928
|
this.createData.faceIndex = -1;
|
|
1908
1929
|
this.createData.renaming = false;
|
|
1930
|
+
this.createData.toBeDeleted = false;
|
|
1909
1931
|
this.createData.editingIndex = index;
|
|
1910
1932
|
this.createData.regionPrefix = this._editingZincObject.region.getFullPath();
|
|
1911
1933
|
this.createData.tempGroupName = this._editingZincObject.groupName;
|
|
@@ -1915,6 +1937,7 @@ export default {
|
|
|
1915
1937
|
this._editingZincObject = zincObject;
|
|
1916
1938
|
this.createData.faceIndex = faceIndex;
|
|
1917
1939
|
this.createData.renaming = false;
|
|
1940
|
+
this.createData.toBeDeleted = false;
|
|
1918
1941
|
this.createData.editingIndex = vertexIndex;
|
|
1919
1942
|
this.createData.regionPrefix = this._editingZincObject.region.getFullPath();
|
|
1920
1943
|
this.createData.tempGroupName = this._editingZincObject.groupName;
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<el-container class="t-slides-container">
|
|
3
3
|
<el-main class="slides-block">
|
|
4
|
+
<el-row class="slide-row">
|
|
5
|
+
<el-checkbox
|
|
6
|
+
v-model="discardAlpha"
|
|
7
|
+
>
|
|
8
|
+
Discard Translucent Pixel
|
|
9
|
+
</el-checkbox>
|
|
10
|
+
</el-row>
|
|
4
11
|
<el-row class="slide-row">
|
|
5
12
|
<el-col :offset="0" :span="8">
|
|
6
13
|
Brightness
|
|
@@ -120,6 +127,7 @@ import {
|
|
|
120
127
|
Plus as ElIconPlus,
|
|
121
128
|
} from '@element-plus/icons-vue'
|
|
122
129
|
import {
|
|
130
|
+
ElCheckbox as Checkbox,
|
|
123
131
|
ElCol as Col,
|
|
124
132
|
ElContainer as Container,
|
|
125
133
|
ElDivider as Divider,
|
|
@@ -140,6 +148,7 @@ import { markRaw } from 'vue';
|
|
|
140
148
|
export default {
|
|
141
149
|
name: "TextureSlidesControls",
|
|
142
150
|
components: {
|
|
151
|
+
Checkbox,
|
|
143
152
|
Col,
|
|
144
153
|
Container,
|
|
145
154
|
Divider,
|
|
@@ -158,6 +167,7 @@ export default {
|
|
|
158
167
|
return {
|
|
159
168
|
brightness: 0.0,
|
|
160
169
|
contrast: 1.0,
|
|
170
|
+
discardAlpha: true,
|
|
161
171
|
settings: [],
|
|
162
172
|
directions: [
|
|
163
173
|
{
|
|
@@ -192,6 +202,14 @@ export default {
|
|
|
192
202
|
}
|
|
193
203
|
},
|
|
194
204
|
immediate: false,
|
|
205
|
+
},
|
|
206
|
+
discardAlpha: {
|
|
207
|
+
handler: function (value) {
|
|
208
|
+
if (this.zincObject) {
|
|
209
|
+
this.zincObject.discardAlphaPixel(value);
|
|
210
|
+
}
|
|
211
|
+
},
|
|
212
|
+
immediate: false,
|
|
195
213
|
}
|
|
196
214
|
},
|
|
197
215
|
methods: {
|
|
@@ -201,11 +219,13 @@ export default {
|
|
|
201
219
|
this.settings = this.zincObject.getTextureSettings();
|
|
202
220
|
this.brightness = this.zincObject.getBrightness();
|
|
203
221
|
this.contrast = this.zincObject.getContrast();
|
|
222
|
+
this.discardAlpha = this.zincObject.isAlphaPixelDiscarded();
|
|
204
223
|
} else {
|
|
205
224
|
this.zincObject = undefined;
|
|
206
225
|
this.settings = [];
|
|
207
226
|
this.brightness = 0.0;
|
|
208
227
|
this.contrast = 1.0;
|
|
228
|
+
this.discardAlpha = true;
|
|
209
229
|
}
|
|
210
230
|
},
|
|
211
231
|
addNewSlide: function () {
|
|
@@ -277,7 +297,7 @@ export default {
|
|
|
277
297
|
|
|
278
298
|
.t-slides-container {
|
|
279
299
|
width: 250px;
|
|
280
|
-
height:
|
|
300
|
+
height: 250px;
|
|
281
301
|
overflow-y: auto;
|
|
282
302
|
}
|
|
283
303
|
|
package/src/components.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export {}
|
|
|
8
8
|
declare module 'vue' {
|
|
9
9
|
export interface GlobalComponents {
|
|
10
10
|
ElButton: typeof import('element-plus/es')['ElButton']
|
|
11
|
+
ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
|
|
11
12
|
ElCol: typeof import('element-plus/es')['ElCol']
|
|
12
13
|
ElCollapse: typeof import('element-plus/es')['ElCollapse']
|
|
13
14
|
ElCollapseItem: typeof import('element-plus/es')['ElCollapseItem']
|
package/src/scripts/Utilities.js
CHANGED
|
@@ -50,6 +50,16 @@ export const getEditablePoint = (eventIdentifiers) => {
|
|
|
50
50
|
return undefined;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
+
export const getDeletableObjects = (eventIdentifiers) => {
|
|
54
|
+
const zincObject = eventIdentifiers[0].data?.zincObject;
|
|
55
|
+
if (zincObject) {
|
|
56
|
+
if (zincObject.isEditable) {
|
|
57
|
+
return zincObject;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
return undefined;
|
|
61
|
+
}
|
|
62
|
+
|
|
53
63
|
export const getEditableLines = (eventIdentifiers) => {
|
|
54
64
|
const zincObject = eventIdentifiers[0].data?.zincObject;
|
|
55
65
|
if (zincObject) {
|
|
@@ -82,17 +92,6 @@ export const getClickedObjects = (event) => {
|
|
|
82
92
|
return undefined;
|
|
83
93
|
}
|
|
84
94
|
|
|
85
|
-
export const getDeletableObjects = (event) => {
|
|
86
|
-
const zincObjects = event.zincObjects;
|
|
87
|
-
if (zincObjects.length > 0 && zincObjects[0]) {
|
|
88
|
-
const zincObject = zincObjects[0];
|
|
89
|
-
if (zincObject.isEditable) {
|
|
90
|
-
return zincObject;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
return undefined;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
95
|
export const movePoint = (zincObject, index, diff) => {
|
|
97
96
|
if (zincObject?.isEditable && zincObject?.isPointset) {
|
|
98
97
|
let found = false;
|