Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(crosshairs): Reference lines are wrongly clipped #552

Merged
merged 1 commit into from
Apr 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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