@cornerstonejs/tools 1.2.4 → 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cornerstonejs/tools",
3
- "version": "1.2.4",
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.4",
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": "e1d087a225781bea19f248064cc536f0a24f35c0"
53
+ "gitHead": "b83dd634bf1fde35ed7385f2192ef8fd9fe9542f"
54
54
  }
@@ -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
- this.triggerAnnotationCompleted(annotation);
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
- this.triggerAnnotationCompleted(annotation);
317
+ if (!textBox.hasMoved) {
318
+ this.triggerAnnotationCompleted(annotation);
319
+ }
314
320
 
315
321
  this.isDrawing = false;
316
322
  this.drawData = undefined;
@@ -563,6 +563,8 @@ function completeOpenContourEdit(element: HTMLDivElement) {
563
563
  findOpenUShapedContourVectorToPeak(fusedCanvasPoints, viewport);
564
564
  }
565
565
 
566
+ annotation.invalidated = true;
567
+
566
568
  this.triggerAnnotationModified(annotation, enabledElement);
567
569
  }
568
570