Skip to content

Commit

Permalink
Merge pull request #825 from dannyrb/feature/overlay-tool
Browse files Browse the repository at this point in the history
Fix prettier build error
  • Loading branch information
dannyrb authored Feb 11, 2019
2 parents 3aaaf13 + bb52360 commit 6c663a0
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 19 deletions.
45 changes: 32 additions & 13 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 6 additions & 5 deletions src/tools/OverlayTool.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) *
Expand Down
2 changes: 1 addition & 1 deletion src/version.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export default '3.0.1';
export default '3.0.2';

0 comments on commit 6c663a0

Please sign in to comment.