Skip to content

Commit

Permalink
Lazy
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdcolin committed Dec 18, 2024
1 parent 2169879 commit 874d46f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,12 @@ const useStyles = makeStyles()(theme => ({
linkIcon: {
color: colord(theme.palette.highlight.main).darken(0.2).toRgbString(),
},
z3: {
zIndex: 3,
},
}))

const Highlight = observer(function Highlight({
const Highlight = observer(function ({
model,
highlight,
}: {
Expand Down Expand Up @@ -82,7 +85,6 @@ const Highlight = observer(function Highlight({
...highlight,
refName: asm?.getCanonicalRefName(highlight.refName) ?? highlight.refName,
})
const r = h.wpw()

return h ? (
<div
Expand All @@ -95,10 +97,10 @@ const Highlight = observer(function Highlight({
<Tooltip title="Highlighted from URL parameter" arrow>
<IconButton
ref={anchorEl}
className={classes.z3}
onClick={() => {
setOpen(true)
}}
style={{ zIndex: 3 }}
>
<LinkIcon fontSize="small" className={classes.linkIcon} />
</IconButton>
Expand Down
5 changes: 3 additions & 2 deletions plugins/sv-inspector/src/SvInspectorView/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { lazy } from 'react'

import ViewType from '@jbrowse/core/pluggableElementTypes/ViewType'
import { getContainingView, getSession } from '@jbrowse/core/util'
import { navToMultiLevelBreak } from '@jbrowse/sv-core'
import { type IAnyStateTreeNode, getParent } from 'mobx-state-tree'

import ReactComponent from './components/SvInspectorView'
import stateModelFactory from './model'

import type { SvInspectorViewModel } from './model'
Expand Down Expand Up @@ -42,7 +43,7 @@ export default function SvInspectorViewF(pluginManager: PluginManager) {
name: 'SvInspectorView',
displayName: 'SV inspector',
stateModel,
ReactComponent,
ReactComponent: lazy(() => import('./components/SvInspectorView')),
})
})
}

0 comments on commit 874d46f

Please sign in to comment.