File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -407,7 +407,7 @@ export default class EFPViewer
407407 borderRadius : 1 ,
408408 } ) }
409409 >
410- { activeData . viewData [ activeViewIndex ] . supported ? (
410+ { sortedViewData [ activeViewIndex ] . supported ? (
411411 < >
412412 < div >
413413 < Typography
@@ -422,9 +422,9 @@ export default class EFPViewer
422422 { geneticElement ?. id }
423423 </ Typography >
424424
425- { activeData . views [ activeViewIndex ] . name !== 'cellEFP' && (
425+ { sortedViews [ activeViewIndex ] . name !== 'cellEFP' && (
426426 < GeneDistributionChart
427- data = { { ...activeData . viewData [ activeViewIndex ] } }
427+ data = { { ...sortedViewData [ activeViewIndex ] } }
428428 />
429429 ) }
430430 </ div >
@@ -447,7 +447,7 @@ export default class EFPViewer
447447 zIndex : 10 ,
448448 } ) }
449449 data = { {
450- ...activeData . viewData [ activeViewIndex ] ,
450+ ...sortedViewData [ activeViewIndex ] ,
451451 } }
452452 maskThreshold = { state . maskThreshold }
453453 colorMode = { state . colorMode }
Original file line number Diff line number Diff line change @@ -8,7 +8,6 @@ import { Theme, useTheme } from '@mui/material'
88import {
99 ColorMode ,
1010 EFPData ,
11- EFPGroup ,
1211 EFPId ,
1312 EFPSampleData ,
1413 EFPSVGCache ,
@@ -90,7 +89,7 @@ export const useEFPSVG = (
9089
9190export function getColor (
9291 value : number ,
93- group : EFPSampleData | EFPGroup ,
92+ group : EFPSampleData ,
9493 control : number ,
9594 theme : Theme ,
9695 colorMode : ColorMode ,
@@ -124,12 +123,13 @@ export function getColor(
124123
125124export function useStyles (
126125 id : string ,
127- { groups , control } : EFPData ,
126+ data : EFPData ,
128127 colorMode : ColorMode ,
129128 maskThreshold ?: number ,
130129 maskingEnabled ?: boolean
131130) {
132131 const theme = useTheme ( )
132+ const { groups, control } = data
133133 const samples = groups
134134 . flatMap ( ( group ) =>
135135 group . tissues . map (
@@ -138,7 +138,7 @@ export function useStyles(
138138 tissue . id
139139 } { fill: ${ getColor (
140140 tissue . mean ,
141- group ,
141+ data ,
142142 control ?? 1 ,
143143 theme ,
144144 colorMode ,
You can’t perform that action at this time.
0 commit comments