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: Add storeAsInitialCamera parameter to StackViewport setCamera #228

Merged
merged 1 commit into from
Oct 5, 2022

Conversation

volrath
Copy link
Contributor

@volrath volrath commented Sep 28, 2022

While reading the API documentation on StackViewport.setZoom I wanted to try out the storeAsInitialCamera parameter, but I noticed it wasn't working. Upon further inspection I realized it was due to the fact that, even though Viewport.setCamera has said parameter, StackViewport doesn't, so the the value is never passed down to the super class.

Please note that I purposely omitted the parameter from the call to this.setCameraCPU given that I believe it is not used anywhere. Not sure if this is the correct take though, so let me know if this requires further work.

@netlify
Copy link

netlify bot commented Sep 28, 2022

Deploy Preview for cornerstone-3d-docs ready!

Name Link
🔨 Latest commit 5b029bf
🔍 Latest deploy log https://app.netlify.com/sites/cornerstone-3d-docs/deploys/6334abf843ddcd0008efe1d9
😎 Deploy Preview https://deploy-preview-228--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.

@wayfarer3130
Copy link
Collaborator

This is a simple fix, looks correct to me. @sedghi wasnt sure if I should approve this one, or if you wanted a peak first.

@sedghi sedghi changed the title [FIX] Add storeAsInitialCamera parameter to StackViewport.setCamera fix: Add storeAsInitialCamera parameter to StackViewport setCamera Oct 5, 2022
@sedghi sedghi merged commit b951acc into cornerstonejs:main Oct 5, 2022
@sedghi
Copy link
Member

sedghi commented Oct 5, 2022

Thanks @volrath , this is a great PR

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.

3 participants