@cornerstonejs/tools 1.2.3 → 1.2.5
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/cjs/tools/annotation/ArrowAnnotateTool.js +1 -2
- package/dist/cjs/tools/annotation/ArrowAnnotateTool.js.map +1 -1
- package/dist/cjs/tools/annotation/planarFreehandROITool/closedContourEditLoop.js +1 -0
- package/dist/cjs/tools/annotation/planarFreehandROITool/closedContourEditLoop.js.map +1 -1
- package/dist/cjs/tools/annotation/planarFreehandROITool/drawLoop.js +8 -2
- package/dist/cjs/tools/annotation/planarFreehandROITool/drawLoop.js.map +1 -1
- package/dist/cjs/tools/annotation/planarFreehandROITool/openContourEditLoop.js +1 -0
- package/dist/cjs/tools/annotation/planarFreehandROITool/openContourEditLoop.js.map +1 -1
- package/dist/esm/tools/annotation/ArrowAnnotateTool.js +1 -2
- package/dist/esm/tools/annotation/ArrowAnnotateTool.js.map +1 -1
- package/dist/esm/tools/annotation/planarFreehandROITool/closedContourEditLoop.js +1 -0
- package/dist/esm/tools/annotation/planarFreehandROITool/closedContourEditLoop.js.map +1 -1
- package/dist/esm/tools/annotation/planarFreehandROITool/drawLoop.js +8 -2
- package/dist/esm/tools/annotation/planarFreehandROITool/drawLoop.js.map +1 -1
- package/dist/esm/tools/annotation/planarFreehandROITool/openContourEditLoop.js +1 -0
- package/dist/esm/tools/annotation/planarFreehandROITool/openContourEditLoop.js.map +1 -1
- package/dist/umd/index.js +1 -1
- package/dist/umd/index.js.map +1 -1
- package/package.json +3 -3
- package/src/tools/annotation/ArrowAnnotateTool.ts +2 -1
- package/src/tools/annotation/planarFreehandROITool/closedContourEditLoop.ts +2 -0
- package/src/tools/annotation/planarFreehandROITool/drawLoop.ts +8 -2
- package/src/tools/annotation/planarFreehandROITool/openContourEditLoop.ts +2 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cornerstonejs/tools",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.5",
|
|
4
4
|
"description": "Cornerstone3D Tools",
|
|
5
5
|
"main": "dist/umd/index.js",
|
|
6
6
|
"types": "dist/esm/index.d.ts",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"webpack:watch": "webpack --mode development --progress --watch --config ./.webpack/webpack.dev.js"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@cornerstonejs/core": "^1.2.
|
|
30
|
+
"@cornerstonejs/core": "^1.2.5",
|
|
31
31
|
"lodash.clonedeep": "4.5.0",
|
|
32
32
|
"lodash.get": "^4.4.2"
|
|
33
33
|
},
|
|
@@ -50,5 +50,5 @@
|
|
|
50
50
|
"type": "individual",
|
|
51
51
|
"url": "https://ohif.org/donate"
|
|
52
52
|
},
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "b83dd634bf1fde35ed7385f2192ef8fd9fe9542f"
|
|
54
54
|
}
|
|
@@ -778,7 +778,8 @@ class ArrowAnnotateTool extends AnnotationTool {
|
|
|
778
778
|
|
|
779
779
|
// Need to update to sync w/ annotation while unlinked/not moved
|
|
780
780
|
if (!data.handles.textBox.hasMoved) {
|
|
781
|
-
|
|
781
|
+
// linked to the point that doesn't have the arrowhead by default
|
|
782
|
+
const canvasTextBoxCoords = canvasCoordinates[1];
|
|
782
783
|
|
|
783
784
|
data.handles.textBox.worldPosition =
|
|
784
785
|
viewport.canvasToWorld(canvasTextBoxCoords);
|
|
@@ -444,6 +444,8 @@ function completeClosedContourEdit(element: HTMLDivElement) {
|
|
|
444
444
|
annotation.data.polyline = worldPoints;
|
|
445
445
|
annotation.data.isOpenContour = false;
|
|
446
446
|
|
|
447
|
+
annotation.invalidated = true;
|
|
448
|
+
|
|
447
449
|
this.triggerAnnotationModified(annotation, enabledElement);
|
|
448
450
|
}
|
|
449
451
|
|
|
@@ -229,8 +229,11 @@ function completeDrawClosedContour(element: HTMLDivElement): boolean {
|
|
|
229
229
|
|
|
230
230
|
annotation.data.polyline = worldPoints;
|
|
231
231
|
annotation.data.isOpenContour = false;
|
|
232
|
+
const { textBox } = annotation.data.handles;
|
|
232
233
|
|
|
233
|
-
|
|
234
|
+
if (!textBox.hasMoved) {
|
|
235
|
+
this.triggerAnnotationCompleted(annotation);
|
|
236
|
+
}
|
|
234
237
|
|
|
235
238
|
this.isDrawing = false;
|
|
236
239
|
this.drawData = undefined;
|
|
@@ -296,6 +299,7 @@ function completeDrawOpenContour(element: HTMLDivElement): boolean {
|
|
|
296
299
|
|
|
297
300
|
annotation.data.polyline = worldPoints;
|
|
298
301
|
annotation.data.isOpenContour = true;
|
|
302
|
+
const { textBox } = annotation.data.handles;
|
|
299
303
|
|
|
300
304
|
// Add the first and last points to the list of handles. These means they
|
|
301
305
|
// will render handles on mouse hover.
|
|
@@ -310,7 +314,9 @@ function completeDrawOpenContour(element: HTMLDivElement): boolean {
|
|
|
310
314
|
findOpenUShapedContourVectorToPeak(canvasPoints, viewport);
|
|
311
315
|
}
|
|
312
316
|
|
|
313
|
-
|
|
317
|
+
if (!textBox.hasMoved) {
|
|
318
|
+
this.triggerAnnotationCompleted(annotation);
|
|
319
|
+
}
|
|
314
320
|
|
|
315
321
|
this.isDrawing = false;
|
|
316
322
|
this.drawData = undefined;
|