@cornerstonejs/core 2.7.0 → 2.7.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.
@@ -1023,9 +1023,7 @@ class StackViewport extends Viewport {
1023
1023
  }
1024
1024
  getImageDataMetadata(image) {
1025
1025
  const { imagePlaneModule, imagePixelModule } = this.buildMetadata(image);
1026
- let rowCosines, columnCosines;
1027
- rowCosines = imagePlaneModule.rowCosines;
1028
- columnCosines = imagePlaneModule.columnCosines;
1026
+ let { rowCosines, columnCosines } = imagePlaneModule;
1029
1027
  if (rowCosines == null || columnCosines == null) {
1030
1028
  rowCosines = [1, 0, 0];
1031
1029
  columnCosines = [0, 1, 0];
@@ -12,7 +12,8 @@ export declare class HistoryMemo {
12
12
  private undoAvailable;
13
13
  private ring;
14
14
  constructor(label?: string, size?: number);
15
- get size(): any;
15
+ get size(): number;
16
+ set size(newSize: number);
16
17
  undo(items?: number): void;
17
18
  redo(items?: number): void;
18
19
  push(item: Memo | Memoable): Memo;
@@ -10,6 +10,13 @@ export class HistoryMemo {
10
10
  get size() {
11
11
  return this._size;
12
12
  }
13
+ set size(newSize) {
14
+ this.ring = new Array(newSize);
15
+ this._size = newSize;
16
+ this.position = -1;
17
+ this.redoAvailable = 0;
18
+ this.undoAvailable = 0;
19
+ }
13
20
  undo(items = 1) {
14
21
  while (items > 0 && this.undoAvailable > 0) {
15
22
  const item = this.ring[this.position];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cornerstonejs/core",
3
- "version": "2.7.0",
3
+ "version": "2.7.2",
4
4
  "description": "",
5
5
  "module": "./dist/esm/index.js",
6
6
  "types": "./dist/esm/index.d.ts",
@@ -82,5 +82,5 @@
82
82
  "type": "individual",
83
83
  "url": "https://ohif.org/donate"
84
84
  },
85
- "gitHead": "5d6fbf03e2358b1794b60f3162debb3d73cfe48d"
85
+ "gitHead": "010ff3c4a19f8b20d288768c2c95231dcc7c5ed0"
86
86
  }