@cornerstonejs/tools 1.58.4 → 1.58.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.58.4",
3
+ "version": "1.58.5",
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.58.4",
32
+ "@cornerstonejs/core": "^1.58.5",
33
33
  "@icr/polyseg-wasm": "0.4.0",
34
34
  "@types/offscreencanvas": "2019.7.3",
35
35
  "comlink": "^4.4.1",
@@ -59,5 +59,5 @@
59
59
  "type": "individual",
60
60
  "url": "https://ohif.org/donate"
61
61
  },
62
- "gitHead": "27788d9a480cf3dff59865f721cde0d158439734"
62
+ "gitHead": "0bb6751e6d59b37925d763a3fc224b6f7acc6538"
63
63
  }
@@ -98,12 +98,20 @@ class AnnotationRenderingEngine {
98
98
  // If there is nothing left that is flagged for rendering, stop here
99
99
  // and allow RAF to be called again
100
100
  if (this._needsRender.size === 0) {
101
- this._animationFrameSet = false;
102
- this._animationFrameHandle = null;
103
- return;
101
+ break;
104
102
  }
105
103
  }
106
104
  }
105
+
106
+ this._animationFrameSet = false;
107
+ this._animationFrameHandle = null;
108
+
109
+ // Call render again which will use RAF to call this function asynchronously
110
+ // if there is any viewport that needs to be rendered because when
111
+ // `triggerRender` is called inside the render loop a listener can flag new
112
+ // viewports that need to be rendered and some of the viewports that were
113
+ // already rendered can be added back to `_needsRender`.
114
+ this._render();
107
115
  };
108
116
 
109
117
  private _setAllViewportsToBeRenderedNextFrame() {