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: ZoomTool fix for imageData spacing for PolyData files #288

Closed
wants to merge 0 commits into from

Conversation

NeilMacPhee
Copy link
Contributor

Fix

  • Added spacing parameter presets of [0.5, 0.5, 0.5] for cases where the viewport does not have imageData, such as PolyData where actors are added directly to viewport

@netlify
Copy link

netlify bot commented Nov 9, 2022

Deploy Preview for cornerstone-3d-docs ready!

Name Link
🔨 Latest commit 64e4ab3
🔍 Latest deploy log https://app.netlify.com/sites/cornerstone-3d-docs/deploys/637e4f4ffbb94c00082cc8c4
😎 Deploy Preview https://deploy-preview-288--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.

const imageData = viewport.getImageData();
// Added spacing preset in case there is no imageData on viewport
let spacing = [0.5, 0.5, 0.5];
if (viewport.getImageData()) {
Copy link
Member

Choose a reason for hiding this comment

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

You can say const imageData = viewport.getImageData() and check on imageData instead of twice calling the viewport.geteImageData()

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.

Why [0.5, 0.5, 0.5]? Why not 1, 1, 1

There is a weird jump after I start the drag for the zoom see below

5eddcf58-9d0d-4848-bafc-fa70d6029b80.webm

wayfarer3130 pushed a commit that referenced this pull request Jan 20, 2023
* moved "eslint-config-prettier"

* update lock file

Co-authored-by: flink <[email protected]>
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.

2 participants