Skip to content

Commit

Permalink
Remove Paper outline on the no tracks active status
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdcolin committed Feb 28, 2022
1 parent f6350d9 commit 20ff611
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ const LinearGenomeView = observer(({ model }: { model: LGV }) => {
)}
<TracksContainer model={model}>
{!tracks.length ? (
<Paper variant="outlined" className={classes.note}>
<Paper className={classes.note}>
<Typography>No tracks active.</Typography>
<Button
variant="contained"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { isAlive } from 'mobx-state-tree'
import { BaseTrackModel } from '@jbrowse/core/pluggableElementTypes/models'
import { getConf } from '@jbrowse/core/configuration'
import { ResizeHandle } from '@jbrowse/core/ui'
import { useDebouncedCallback, getContainingView } from '@jbrowse/core/util'
import { useDebouncedCallback } from '@jbrowse/core/util'
import clsx from 'clsx'
import { makeStyles } from '@material-ui/core/styles'

Expand Down Expand Up @@ -50,16 +50,13 @@ const useStyles = makeStyles(theme => ({

type LGV = LinearGenomeViewModel

function TrackContainer(props: {
model: LinearGenomeViewModel
track: BaseTrackModel
}) {
function TrackContainer(props: { model: LGV; track: BaseTrackModel }) {
const classes = useStyles()
const { model, track } = props
const display = track.displays[0]
const { horizontalScroll, draggingTrackId, moveTrack } = model
const { id, trackLabels, horizontalScroll, draggingTrackId, moveTrack } =
model
const { height } = display
const view = getContainingView(display) as LGV
const trackId = getConf(track, 'trackId')
const ref = useRef(null)

Expand All @@ -86,12 +83,12 @@ function TrackContainer(props: {

return (
<div className={classes.root}>
{view.trackLabels !== 'hidden' ? (
{trackLabels !== 'hidden' ? (
<TrackLabel
track={track}
className={clsx(
classes.trackLabel,
view.trackLabels === 'overlapping'
trackLabels === 'overlapping'
? classes.trackLabelOverlap
: classes.trackLabelInline,
)}
Expand All @@ -106,7 +103,7 @@ function TrackContainer(props: {
display.setScrollTop(target.scrollTop)
}}
onDragEnter={debouncedOnDragEnter}
data-testid={`trackRenderingContainer-${view.id}-${trackId}`}
data-testid={`trackRenderingContainer-${id}-${trackId}`}
role="presentation"
>
<div ref={ref} style={{ transform: `scaleX(${model.scaleFactor})` }}>
Expand Down

0 comments on commit 20ff611

Please sign in to comment.