Skip to content

Commit

Permalink
Misc
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdcolin committed Jan 3, 2025
1 parent 27c325f commit e305909
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/MultilevelLinearView/components/ImportForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ const ImportForm = observer(
label: regions[0]?.refName,
})

const selectedRegion = option?.getLocation()
const selectedRegion = option?.getLocation() || option?.getLabel()

useEffect(() => {
const num = parseInt(numViews, 10)
Expand Down
13 changes: 8 additions & 5 deletions src/MultilevelLinearView/model.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import {
addDisposer,
cast,
Expand All @@ -6,15 +7,13 @@ import {
types,
Instance,
SnapshotIn,
getEnv,
} from 'mobx-state-tree'
import FolderOpenIcon from '@mui/icons-material/FolderOpen'
import SwapVertIcon from '@mui/icons-material/SwapVert'
import MenuIcon from '@mui/icons-material/Menu'
import FormatAlignCenterIcon from '@mui/icons-material/FormatAlignCenter'
import LinkIcon from '@mui/icons-material/Link'
import LinkOffIcon from '@mui/icons-material/LinkOff'
/* eslint-disable @typescript-eslint/no-explicit-any */
import BaseViewModel from '@jbrowse/core/pluggableElementTypes/models/BaseViewModel'
import { MenuItem } from '@jbrowse/core/ui'
import { getSession } from '@jbrowse/core/util'
Expand Down Expand Up @@ -62,9 +61,13 @@ export default function stateModelFactory(pluginManager: PluginManager) {
},

get refNames() {
return self.views.map((v) => [
...new Set(v.staticBlocks.map((m: any) => m.refName)),
])
return [
...new Set(
self.views
.map((v) => v.staticBlocks.map((m: any) => m.refName))
.flat(),
),
]
},

get assemblyNames() {
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import MultilevelLinearViewF from './MultilevelLinearView'
import LinearGenomeMultilevelViewF from './LinearGenomeMultilevelView'
import { version } from '../package.json'

export default class MultilevelLinearView extends Plugin {
export default class extends Plugin {
name = 'MultilevelLinearViewPlugin'
version = version

Expand Down

0 comments on commit e305909

Please sign in to comment.