Skip to content

Commit

Permalink
Fix observability of track labels offset setting in lgv
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdcolin committed Mar 16, 2022
1 parent 044abdf commit f7a6535
Showing 1 changed file with 15 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,25 +54,21 @@ const useStyles = makeStyles(theme => ({

type LGV = LinearGenomeViewModel

function TrackContainerLabel({
model,
view,
}: {
model: BaseTrackModel
view: LGV
}) {
const classes = useStyles()
const labelStyle =
view.trackLabels === 'overlapping'
? classes.trackLabelOverlap
: classes.trackLabelInline
return view.trackLabels !== 'hidden' ? (
<TrackLabel
track={model}
className={clsx(classes.trackLabel, labelStyle)}
/>
) : null
}
const TrackContainerLabel = observer(
({ model, view }: { model: BaseTrackModel; view: LGV }) => {
const classes = useStyles()
const labelStyle =
view.trackLabels === 'overlapping'
? classes.trackLabelOverlap
: classes.trackLabelInline
return view.trackLabels !== 'hidden' ? (
<TrackLabel
track={model}
className={clsx(classes.trackLabel, labelStyle)}
/>
) : null
},
)

function TrackContainer({
model,
Expand Down

0 comments on commit f7a6535

Please sign in to comment.