Skip to content

Commit

Permalink
Fix sort after changing feature height
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdcolin committed Mar 14, 2024
1 parent 4287adb commit ab2f980
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion plugins/alignments/src/LinearPileupDisplay/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import SortIcon from '@mui/icons-material/Sort'
import { SharedLinearPileupDisplayMixin } from './SharedLinearPileupDisplayMixin'
import { observable } from 'mobx'

// async
// lzies
const SortByTagDialog = lazy(() => import('./components/SortByTag'))
const ModificationsDialog = lazy(
() => import('./components/ColorByModifications'),
Expand Down Expand Up @@ -152,6 +152,15 @@ function stateModelFactory(configSchema: AnyConfigurationSchemaType) {
tag,
}
},
/**
* #action
* overrides base from SharedLinearPileupDisplay to make sortReady false
* since changing feature height destroys the sort-induced layout
*/
setFeatureHeight(n?: number) {
self.sortReady = false
self.featureHeight = n
},
}))
.actions(self => {
// resets the sort object and refresh whole display on reload
Expand Down

0 comments on commit ab2f980

Please sign in to comment.