diff --git a/packages/tools/src/tools/CrosshairsTool.ts b/packages/tools/src/tools/CrosshairsTool.ts index 32ca4d4e71..a58537e5d3 100644 --- a/packages/tools/src/tools/CrosshairsTool.ts +++ b/packages/tools/src/tools/CrosshairsTool.ts @@ -782,6 +782,9 @@ class CrosshairsTool extends AnnotationTool { const referenceLines = []; + // get canvas information for points and lines (canvas box, canvas horizontal distances) + const canvasBox = [0, 0, clientWidth, clientHeight]; + otherViewportAnnotations.forEach((annotation) => { const { data } = annotation; @@ -831,9 +834,6 @@ class CrosshairsTool extends AnnotationTool { const pointWorld1: Types.Point3 = [0, 0, 0]; vtkMath.subtract(otherViewportCenterWorld, direction, pointWorld1); - // get canvas information for points and lines (canvas box, canvas horizontal distances) - const canvasBox = [0, 0, clientWidth, clientHeight]; - const pointCanvas0 = viewport.worldToCanvas(pointWorld0); const otherViewportCenterCanvas = viewport.worldToCanvas(