File tree Expand file tree Collapse file tree 2 files changed +16
-6
lines changed
src/components/graph/nodes Expand file tree Collapse file tree 2 files changed +16
-6
lines changed Original file line number Diff line number Diff line change @@ -11,11 +11,18 @@ import { zoomStyles } from '../zoom.styles';
1111
1212export const LABEL_BLOCK_HEIGHT = 30 ; // px, matches label box vertical size
1313
14- export const getContainerStyle = ( theme : Theme , isLight : boolean ) => ( {
15- ...zoomStyles . labeledGroupBorder ( theme ) ,
16- background : theme . tree ?. is . minimalDetail ? ( isLight ? theme . palette . grey [ 200 ] : colors . grey [ 700 ] ) : 'transparent' ,
17- borderColor : isLight ? colors . grey [ 400 ] : colors . grey [ 500 ] ,
18- } ) ;
14+ export const getContainerStyle = ( theme : Theme , isLight : boolean ) => {
15+ let backgroundColor = 'transparent' ;
16+ if ( theme . tree ?. is . minimalDetail ) {
17+ backgroundColor = isLight ? theme . palette . grey [ 200 ] : colors . grey [ 700 ] ;
18+ }
19+
20+ return {
21+ ...zoomStyles . labeledGroupBorder ( theme ) ,
22+ background : backgroundColor ,
23+ borderColor : isLight ? colors . grey [ 400 ] : colors . grey [ 500 ] ,
24+ } ;
25+ } ;
1926
2027export const labeledGroupNodeStyles = {
2128 label : ( theme ) => ( {
Original file line number Diff line number Diff line change @@ -49,7 +49,10 @@ const NetworkModificationNode = (props: NodeProps<ModificationNode>) => {
4949 } , [ props . id , selectionForCopy ] ) ;
5050
5151 const nodeOpacity = useMemo ( ( ) => {
52- return isSelectedForCut ( ) ? ( getLocalStorageTheme ( ) === LIGHT_THEME ? 0.3 : 0.6 ) : 1 ;
52+ if ( ! isSelectedForCut ( ) ) {
53+ return 1 ;
54+ }
55+ return getLocalStorageTheme ( ) === LIGHT_THEME ? 0.3 : 0.6 ;
5356 } , [ isSelectedForCut ] ) ;
5457
5558 const tooltipContent = useMemo ( ( ) => {
You can’t perform that action at this time.
0 commit comments