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): Autopan causing infinite loop #551

Merged
merged 1 commit into from Apr 14, 2023

Conversation

rogerbramon
Copy link
Contributor

@rogerbramon rogerbramon commented Apr 13, 2023

Currently, autopan option of the CrosshairsTool is only working when using predefined orientations (Axial, Sagittal, Coronal). As soon as you rotate the axis, autopan may cause an infinite loop. This PR aims to fix that, changing the implementation to use the canvas context.

In case you want to reproduce the issue, you can:

  1. Add ZoomTool or PanTool to the crosshairs example
  2. Enable autopan to the example
  3. On the example, apply pan or zoom to one of the non main views
  4. Rotate the axis
  5. Select a point in the main view that's out of the viewpoint in one of the other views.

@netlify
Copy link

netlify bot commented Apr 13, 2023

Deploy Preview for cornerstone-3d-docs ready!

Name Link
🔨 Latest commit d1658b6
🔍 Latest deploy log https://app.netlify.com/sites/cornerstone-3d-docs/deploys/6438071277b6b300085a0d96
😎 Deploy Preview https://deploy-preview-551--cornerstone-3d-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

Copy link
Member

@sedghi sedghi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great. This is a great contribution, thanks a lot!

@sedghi sedghi merged commit e54dfb3 into cornerstonejs:main Apr 14, 2023
10 checks passed
@rogerbramon rogerbramon deleted the fix-crosshairs-autopan branch April 14, 2023 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants