@cornerstonejs/tools 1.40.1 → 1.40.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cornerstonejs/tools",
3
- "version": "1.40.1",
3
+ "version": "1.40.3",
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.1",
32
+ "@cornerstonejs/core": "^1.40.3",
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": "499c0dc5d782bfb2d9d930ebb815aba72010c261"
56
+ "gitHead": "5a4bedfe6e8f2b217347109cd0e0c85b7c5bf1d0"
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
- if (addNewPoint) {
443
- this.editData.confirmedPath = this.editData.currentPath;
444
-
445
- // Add the current cursor position as a new control point after clicking
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
- // Start a new search starting at the last control point
451
- this.scissors.startSearch(worldToSlice(worldPos));
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);