diff --git a/package-lock.json b/package-lock.json index 169760ccc..d7e272431 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { - "name": "cornerstone-tools", - "version": "3.0.1", + "name": "@cornerstonejs/tools", + "version": "3.0.2", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -6436,7 +6436,8 @@ "ansi-regex": { "version": "2.1.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -6457,12 +6458,14 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -6477,17 +6480,20 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -6604,7 +6610,8 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -6616,6 +6623,7 @@ "version": "1.0.0", "bundled": true, "dev": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -6630,6 +6638,7 @@ "version": "3.0.4", "bundled": true, "dev": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -6637,12 +6646,14 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "minipass": { "version": "2.3.5", "bundled": true, "dev": true, + "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -6661,6 +6672,7 @@ "version": "0.5.1", "bundled": true, "dev": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -6741,7 +6753,8 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -6753,6 +6766,7 @@ "version": "1.4.0", "bundled": true, "dev": true, + "optional": true, "requires": { "wrappy": "1" } @@ -6838,7 +6852,8 @@ "safe-buffer": { "version": "5.1.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -6874,6 +6889,7 @@ "version": "1.0.2", "bundled": true, "dev": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -6893,6 +6909,7 @@ "version": "3.0.1", "bundled": true, "dev": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -6936,12 +6953,14 @@ "wrappy": { "version": "1.0.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "yallist": { "version": "3.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true } } }, diff --git a/src/tools/OverlayTool.js b/src/tools/OverlayTool.js index 7d210f9ac..08e5e3ec7 100644 --- a/src/tools/OverlayTool.js +++ b/src/tools/OverlayTool.js @@ -46,17 +46,18 @@ export default class OverlayTool extends BaseTool { renderToolData(evt) { const eventData = evt.detail; + const { enabledElement, image, viewport } = eventData; - if (!eventData || !eventData.enabledElement || !eventData.image) { + if (!eventData || !enabledElement || !image) { return; } const context = getNewContext(eventData.canvasContext.canvas); - const overlays = external.cornerstone.metaData.get( - 'overlayPlaneModule', + const overlaysMeta = external.cornerstone.metaData.get( + 'overlayPlaneModule', eventData.image.imageId - ).overlays; - const { enabledElement, viewport } = eventData; + ) || { overlays: [] }; + const overlays = overlaysMeta.overlays; const imageWidth = Math.abs(viewport.displayedArea.brhc.x - viewport.displayedArea.tlhc.x) * diff --git a/src/version.js b/src/version.js index 703c1bb00..3bf38c994 100644 --- a/src/version.js +++ b/src/version.js @@ -1 +1 @@ -export default '3.0.1'; +export default '3.0.2';