@abi-software/scaffoldvuer 1.4.2 → 1.5.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 +2983 -2980
- package/dist/scaffoldvuer.umd.cjs +163 -163
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/ScaffoldTooltip.vue +3 -3
- package/src/components/ScaffoldVuer.vue +16 -7
- package/src/scripts/Utilities.js +3 -3
package/package.json
CHANGED
|
@@ -153,9 +153,9 @@ export default {
|
|
|
153
153
|
if (this.annotationDisplay) {
|
|
154
154
|
const region = this.region ? this.region +"/" : "";
|
|
155
155
|
this.annotationEntry = {
|
|
156
|
-
"featureId":
|
|
157
|
-
"resourceId":
|
|
158
|
-
"resource":
|
|
156
|
+
"featureId": region + this.label,
|
|
157
|
+
"resourceId": this.scaffoldUrl,
|
|
158
|
+
"resource": this.scaffoldUrl,
|
|
159
159
|
};
|
|
160
160
|
}
|
|
161
161
|
}
|
|
@@ -942,7 +942,7 @@ export default {
|
|
|
942
942
|
...mapState(useMainStore, ['userToken']),
|
|
943
943
|
annotationDisplay: function() {
|
|
944
944
|
return this.viewingMode === 'Annotation' && this.tData.active === true &&
|
|
945
|
-
(this.activeDrawMode
|
|
945
|
+
(this.activeDrawMode !== "Point" && this.activeDrawMode !== 'LineString');
|
|
946
946
|
}
|
|
947
947
|
},
|
|
948
948
|
methods: {
|
|
@@ -1351,10 +1351,14 @@ export default {
|
|
|
1351
1351
|
}
|
|
1352
1352
|
}
|
|
1353
1353
|
},
|
|
1354
|
-
createEditTemporaryLines: function(
|
|
1354
|
+
createEditTemporaryLines: function(identifiers) {
|
|
1355
|
+
const worldCoords = identifiers[0].extraData.worldCoords;
|
|
1355
1356
|
if (worldCoords) {
|
|
1356
1357
|
if (this.createData.shape === "LineString" || this.createData.editingIndex > -1) {
|
|
1357
1358
|
if (this.createData.points.length === 1) {
|
|
1359
|
+
this.showRegionTooltipWithAnnotations(identifiers, true, false);
|
|
1360
|
+
this.tData.x = 50;
|
|
1361
|
+
this.tData.y = 200;
|
|
1358
1362
|
if (this._tempLine) {
|
|
1359
1363
|
const positionAttribute = this._tempLine.geometry.getAttribute( 'position' );
|
|
1360
1364
|
positionAttribute.setXYZ(1, worldCoords[0], worldCoords[1], worldCoords[2]);
|
|
@@ -1457,7 +1461,7 @@ export default {
|
|
|
1457
1461
|
this._editingZincObject = zincObject;
|
|
1458
1462
|
}
|
|
1459
1463
|
}
|
|
1460
|
-
if (this.activeDrawMode
|
|
1464
|
+
if (this.activeDrawMode !== "Point" && this.activeDrawMode !== "LineString") {
|
|
1461
1465
|
this.showRegionTooltipWithAnnotations(event.identifiers, true, false);
|
|
1462
1466
|
this.tData.x = 50;
|
|
1463
1467
|
this.tData.y = 200;
|
|
@@ -1548,7 +1552,7 @@ export default {
|
|
|
1548
1552
|
}
|
|
1549
1553
|
this.tData.x = event.identifiers[0].coords.x;
|
|
1550
1554
|
this.tData.y = event.identifiers[0].coords.y;
|
|
1551
|
-
this.createEditTemporaryLines(event.identifiers
|
|
1555
|
+
this.createEditTemporaryLines(event.identifiers);
|
|
1552
1556
|
}
|
|
1553
1557
|
}
|
|
1554
1558
|
/**
|
|
@@ -1565,9 +1569,8 @@ export default {
|
|
|
1565
1569
|
this.$refs.scaffoldContainer.getBoundingClientRect();
|
|
1566
1570
|
this.tData.x = event.identifiers[0].coords.x - offsets.left;
|
|
1567
1571
|
this.tData.y = event.identifiers[0].coords.y - offsets.top;
|
|
1568
|
-
this.createEditTemporaryLines(event.identifiers[0].extraData.worldCoords);
|
|
1569
1572
|
}
|
|
1570
|
-
this.createEditTemporaryLines(event.identifiers
|
|
1573
|
+
this.createEditTemporaryLines(event.identifiers);
|
|
1571
1574
|
}
|
|
1572
1575
|
}
|
|
1573
1576
|
}
|
|
@@ -1917,6 +1920,12 @@ export default {
|
|
|
1917
1920
|
annotationFeaturesToPrimitives(this.$module.scene, payload.features);
|
|
1918
1921
|
}
|
|
1919
1922
|
});
|
|
1923
|
+
//Support previously supported encoded resource
|
|
1924
|
+
getDrawnAnnotations(this.annotator, this.userToken, encodeURIComponent(this.url)).then((payload) => {
|
|
1925
|
+
if (payload && payload.features) {
|
|
1926
|
+
annotationFeaturesToPrimitives(this.$module.scene, payload.features);
|
|
1927
|
+
}
|
|
1928
|
+
});
|
|
1920
1929
|
}
|
|
1921
1930
|
}
|
|
1922
1931
|
});
|
|
@@ -2222,7 +2231,7 @@ export default {
|
|
|
2222
2231
|
const noSlash = fullName.slice(0, -1);
|
|
2223
2232
|
annotation.region = noSlash;
|
|
2224
2233
|
fullName = fullName + group;
|
|
2225
|
-
const featureID =
|
|
2234
|
+
const featureID = fullName;
|
|
2226
2235
|
annotation.item.id = featureID;
|
|
2227
2236
|
annotation.feature.id = featureID;
|
|
2228
2237
|
});
|
package/src/scripts/Utilities.js
CHANGED
|
@@ -301,9 +301,9 @@ const createNewAnnotationsWithFeatures = (zincObject, region, group, scaffoldUrl
|
|
|
301
301
|
//Check if region ends with a slash
|
|
302
302
|
let fullName = region.slice(-1) === "/" ? region : region + "/";
|
|
303
303
|
fullName = fullName + group;
|
|
304
|
-
const featureID =
|
|
304
|
+
const featureID = fullName;
|
|
305
305
|
const userAnnotation = {
|
|
306
|
-
resource:
|
|
306
|
+
resource: scaffoldUrl,
|
|
307
307
|
item: {
|
|
308
308
|
"id": featureID,
|
|
309
309
|
},
|
|
@@ -359,7 +359,7 @@ export const addUserAnnotationWithFeature = (service, userToken, zincObject,
|
|
|
359
359
|
* Get the drawn annotation stored on the annotation server
|
|
360
360
|
*/
|
|
361
361
|
export const getDrawnAnnotations = async (service, userToken, scaffoldUrl) => {
|
|
362
|
-
const resource =
|
|
362
|
+
const resource = scaffoldUrl;
|
|
363
363
|
return await service.drawnFeatures(userToken, resource);
|
|
364
364
|
}
|
|
365
365
|
|