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: Inactive styles being unintentionally overwritten in copyActiveToInactiveIfNotProvided #1831

Merged

Conversation

stada526
Copy link
Contributor

@stada526 stada526 commented Feb 17, 2025

Context

The copyActiveToInactiveIfNotProvided method ensures that inactive segmentation styles inherit values from their active counterparts when not explicitly set. However, the previous implementation always assigned values, even when an inactive style property was already defined. This led to unintentional overwriting of user-defined inactive styles.

Changes & Results

  • Replaced direct assignments with nullish coalescing assignment (??=) to only assign values when the inactive properties are null or undefined.

Testing

Checklist

PR

  • My Pull Request title is descriptive, accurate and follows the
    semantic-release format and guidelines.

Code

Public Documentation Updates

  • The documentation page has been updated as necessary for any public API
    additions or removals.

Tested Environment

  • "OS: maxOS 15.1
  • "Node version: v21.7.1
  • "Browser: 130.0.6723.117

Copy link

netlify bot commented Feb 17, 2025

Deploy Preview for cornerstone-3d-docs ready!

Name Link
🔨 Latest commit a0a0d2c
🔍 Latest deploy log https://app.netlify.com/sites/cornerstone-3d-docs/deploys/67b39e4e499e860008f334d8
😎 Deploy Preview https://deploy-preview-1831--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.

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.

Great thanks!

@sedghi sedghi merged commit 8e8c29e into cornerstonejs:main Feb 18, 2025
19 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