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(annotations): Ensure viewports re-render for annotation drawing #1083

Merged
merged 1 commit into from
Feb 14, 2024

Conversation

lscoder
Copy link
Collaborator

@lscoder lscoder commented Feb 14, 2024

Context

In some cases the viewports are not re-rendered making it impossible to draw annotations.

Changes & Results

Updated triggerAnnotationRender responsible for "scheduling" a render call using RAF to make sure that even when an event listener adds a viewport back to the needsRender list it can reschedule a new render call instead of getting blocked.

Testing

Just open some examples such as Spline Contour Segmentation Advanced or Livewire Contour Segmentation and try to add annotations to coronal or sagittal viewpots.

@lscoder lscoder requested a review from sedghi February 14, 2024 13:11
@lscoder lscoder self-assigned this Feb 14, 2024
Copy link

netlify bot commented Feb 14, 2024

Deploy Preview for cornerstone-3d-docs ready!

Name Link
🔨 Latest commit e819e4b
🔍 Latest deploy log https://app.netlify.com/sites/cornerstone-3d-docs/deploys/65ccbc100e4249000713e718
😎 Deploy Preview https://deploy-preview-1083--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 configuration.

@sedghi sedghi changed the title fix: viewport rendering issue fix(annotations): Ensure viewports re-render for annotation drawing Feb 14, 2024
@sedghi sedghi merged commit dd5e81d into cornerstonejs:main Feb 14, 2024
9 checks passed
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