Skip to content

Commit

Permalink
fix(crosshairs): Reference lines are wrongly clipped (#552)
Browse files Browse the repository at this point in the history
  • Loading branch information
rogerbramon committed Apr 14, 2023
1 parent 1ddefd3 commit 0bc2134
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/tools/src/tools/CrosshairsTool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit 0bc2134

Please sign in to comment.