fix: prevent FRACTIONAL colormap from being replaced on opacity change - #431
fix: prevent FRACTIONAL colormap from being replaced on opacity change#431igoroctaviano wants to merge 1 commit into
Conversation
The handleOpacityChange function was always sending color along with opacity, which caused SlideViewer.handleSegmentStyleChange to create a new palette from that flat color, replacing the distinct colormap used by FRACTIONAL segments. Now handleOpacityChange only sends opacity. Color changes are handled separately by handleColorChange, which is already hidden in the UI for FRACTIONAL segments. Fixes #428
|
|
Overall Grade |
Security Reliability Complexity Hygiene |
Code Review Summary
| Analyzer | Status | Updated (UTC) | Details |
|---|---|---|---|
| JavaScript | Aug 29, 2026 1:38p.m. | Review ↗ |
Important
AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.
|
📦 Firebase Preview - Using Published DMVThis preview is using the published
|
|
Visit the preview URL for this PR (updated for commit d84e5e9): https://idc-external-006--pr431-fix-fractional-lut-b-bq5np3b5.web.app (expires Sat, 05 Sep 2026 13:40:14 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 88aacecd98ba54d2f9c8d201a9444e43d1ad8307 |



Summary
Fix bug where FRACTIONAL segmentation colormaps get binarized (replaced with flat color LUT) when adjusting the opacity slider.
Root cause:
SegmentItem.handleOpacityChangewas always sendingcoloralong withopacityin the style options. For FRACTIONAL segments, this causedSlideViewer.handleSegmentStyleChangeto create a newpaletteColorLookupTablefrom that flat color, replacing the distinct colormap that was originally assigned.Fix:
handleOpacityChangenow only sendsopacity. Color changes are handled separately byhandleColorChange, which is already hidden in the UI for FRACTIONAL segments.Test plan
Fixes #428