@cornerstonejs/tools 1.40.1 → 1.40.2
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/LivewireContourTool.js +3 -7
- package/dist/cjs/tools/annotation/LivewireContourTool.js.map +1 -1
- package/dist/esm/tools/annotation/LivewireContourTool.js +3 -7
- package/dist/esm/tools/annotation/LivewireContourTool.js.map +1 -1
- package/dist/types/tools/annotation/LivewireContourTool.d.ts.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/LivewireContourTool.ts +7 -12
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cornerstonejs/tools",
|
|
3
|
-
"version": "1.40.
|
|
3
|
+
"version": "1.40.2",
|
|
4
4
|
"description": "Cornerstone3D Tools",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"types": "dist/types/index.d.ts",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"webpack:watch": "webpack --mode development --progress --watch --config ./.webpack/webpack.dev.js"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@cornerstonejs/core": "^1.40.
|
|
32
|
+
"@cornerstonejs/core": "^1.40.2",
|
|
33
33
|
"comlink": "^4.4.1",
|
|
34
34
|
"lodash.clonedeep": "4.5.0",
|
|
35
35
|
"lodash.get": "^4.4.2"
|
|
@@ -53,5 +53,5 @@
|
|
|
53
53
|
"type": "individual",
|
|
54
54
|
"url": "https://ohif.org/donate"
|
|
55
55
|
},
|
|
56
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "d0219949539e3f24a1b8f880c6c6aba797e061eb"
|
|
57
57
|
}
|
|
@@ -402,7 +402,6 @@ class LivewireContourTool extends AnnotationTool {
|
|
|
402
402
|
const { viewport, renderingEngine } = enabledElement;
|
|
403
403
|
const controlPoints = this.editData.currentPath.getControlPoints();
|
|
404
404
|
let closePath = controlPoints.length >= 2 && doubleClick;
|
|
405
|
-
let addNewPoint = true;
|
|
406
405
|
|
|
407
406
|
// Check if user clicked on the first point to close the curve
|
|
408
407
|
if (controlPoints.length >= 2) {
|
|
@@ -432,24 +431,20 @@ class LivewireContourTool extends AnnotationTool {
|
|
|
432
431
|
}
|
|
433
432
|
|
|
434
433
|
if (closestHandlePoint.index === 0) {
|
|
435
|
-
addNewPoint = false;
|
|
436
434
|
closePath = true;
|
|
437
435
|
}
|
|
438
436
|
}
|
|
439
437
|
|
|
440
438
|
this.editData.closed = this.editData.closed || closePath;
|
|
439
|
+
this.editData.confirmedPath = this.editData.currentPath;
|
|
441
440
|
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
this.editData.confirmedPath.addControlPoint(
|
|
447
|
-
this.editData.currentPath.getLastPoint()
|
|
448
|
-
);
|
|
441
|
+
// Add the current cursor position as a new control point after clicking
|
|
442
|
+
this.editData.confirmedPath.addControlPoint(
|
|
443
|
+
this.editData.currentPath.getLastPoint()
|
|
444
|
+
);
|
|
449
445
|
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
}
|
|
446
|
+
// Start a new search starting at the last control point
|
|
447
|
+
this.scissors.startSearch(worldToSlice(worldPos));
|
|
453
448
|
|
|
454
449
|
annotation.invalidated = true;
|
|
455
450
|
triggerAnnotationRenderForViewportIds(renderingEngine, viewportIdsToRender);
|