File tree Expand file tree Collapse file tree
photomap/frontend/static/javascript Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1617,20 +1617,27 @@ function updateUmapColors() {
16171617 ) ;
16181618 if ( allPointsTraceIndex === - 1 ) return ;
16191619
1620- // Set colors based on curation mode
1620+ // Set colors and opacity based on curation mode
16211621 let markerColors ;
1622+ let markerOpacity ;
1623+
16221624 if ( isCurationModeActive ) {
16231625 // Grey out all points when in curation mode
16241626 markerColors = points . map ( ( ) => "#888888" ) ;
1627+ // Increase opacity of unclustered points to match clustered ones
1628+ markerOpacity = points . map ( ( ) => 0.75 ) ;
16251629 } else {
16261630 // Use cluster colors
16271631 markerColors = points . map ( ( p ) => getClusterColor ( p . cluster ) ) ;
1632+ // Default opacity: unclustered = 0.08, clustered = 0.75
1633+ markerOpacity = points . map ( ( p ) => ( p . cluster === - 1 ? 0.08 : 0.75 ) ) ;
16281634 }
16291635
16301636 Plotly . restyle (
16311637 "umapPlot" ,
16321638 {
1633- "marker.color" : [ markerColors ]
1639+ "marker.color" : [ markerColors ] ,
1640+ "marker.opacity" : [ markerOpacity ]
16341641 } ,
16351642 allPointsTraceIndex
16361643 ) ;
You can’t perform that action at this time.
0 commit comments