@cornerstonejs/tools 4.5.11 → 4.5.12

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.
@@ -28,6 +28,7 @@ class ArrowAnnotateTool extends AnnotationTool {
28
28
  }) {
29
29
  super(toolProps, defaultToolProps);
30
30
  this.addNewAnnotation = (evt) => {
31
+ this.startGroupRecording();
31
32
  const eventDetail = evt.detail;
32
33
  const { currentPoints, element } = eventDetail;
33
34
  const worldPos = currentPoints.world;
@@ -126,6 +127,8 @@ class ArrowAnnotateTool extends AnnotationTool {
126
127
  triggerAnnotationCompleted(annotation);
127
128
  this.createMemo(element, annotation, { newAnnotation: !!this.memo });
128
129
  setAnnotationLabel(annotation, element, label);
130
+ this.endGroupRecording();
131
+ this.doneEditMemo();
129
132
  triggerAnnotationRenderForViewportIds(viewportIdsToRender);
130
133
  });
131
134
  }
@@ -51,6 +51,8 @@ declare abstract class AnnotationTool extends AnnotationDisplayTool {
51
51
  operationType: string;
52
52
  };
53
53
  protected createMemo(element: any, annotation: any, options?: any): void;
54
+ protected startGroupRecording(): void;
55
+ protected endGroupRecording(): void;
54
56
  protected static hydrateBase<T extends AnnotationTool>(ToolClass: new () => T, enabledElement: Types.IEnabledElement, points: Types.Point3[], options?: {
55
57
  annotationUID?: string;
56
58
  toolInstance?: T;
@@ -239,6 +239,12 @@ class AnnotationTool extends AnnotationDisplayTool {
239
239
  createMemo(element, annotation, options) {
240
240
  this.memo ||= AnnotationTool.createAnnotationMemo(element, annotation, options);
241
241
  }
242
+ startGroupRecording() {
243
+ DefaultHistoryMemo.startGroupRecording();
244
+ }
245
+ endGroupRecording() {
246
+ DefaultHistoryMemo.endGroupRecording();
247
+ }
242
248
  static hydrateBase(ToolClass, enabledElement, points, options = {}) {
243
249
  if (!enabledElement) {
244
250
  return null;
@@ -1 +1 @@
1
- export declare const version = "4.5.11";
1
+ export declare const version = "4.5.12";
@@ -1 +1 @@
1
- export const version = '4.5.11';
1
+ export const version = '4.5.12';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cornerstonejs/tools",
3
- "version": "4.5.11",
3
+ "version": "4.5.12",
4
4
  "description": "Cornerstone3D Tools",
5
5
  "types": "./dist/esm/index.d.ts",
6
6
  "module": "./dist/esm/index.js",
@@ -108,7 +108,7 @@
108
108
  "canvas": "3.1.0"
109
109
  },
110
110
  "peerDependencies": {
111
- "@cornerstonejs/core": "4.5.11",
111
+ "@cornerstonejs/core": "4.5.12",
112
112
  "@kitware/vtk.js": "32.12.1",
113
113
  "@types/d3-array": "3.2.1",
114
114
  "@types/d3-interpolate": "3.0.4",
@@ -127,5 +127,5 @@
127
127
  "type": "individual",
128
128
  "url": "https://ohif.org/donate"
129
129
  },
130
- "gitHead": "5ce420b157dde1e5e7b33b0641a56c356f713975"
130
+ "gitHead": "9d272a9af2769b8f12a5af40dcfa7b2ade95d209"
131
131
  }