Skip to content

Commit

Permalink
Fix some tsc
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdcolin committed Aug 20, 2021
1 parent d061209 commit 83e437e
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 49 deletions.
4 changes: 0 additions & 4 deletions plugins/dotplot-view/src/DotplotView/components/Axes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ const useStyles = makeStyles(() => ({
gridRow: '1/2',
pointerEvents: 'none',
},
spacer: {
gridColumn: '1/2',
gridRow: '2/2',
},
htext: {
gridColumn: '2/2',
gridRow: '2/2',
Expand Down
86 changes: 44 additions & 42 deletions plugins/dotplot-view/src/DotplotView/components/DotplotView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,51 +11,53 @@ import Controls from './Controls'
import { locstr } from './util'
import { HorizontalAxis, VerticalAxis } from './Axes'

const useStyles = makeStyles(theme => {
return {
root: {
position: 'relative',
marginBottom: theme.spacing(1),
overflow: 'hidden',
},
viewContainer: {
marginTop: '3px',
},
container: {
display: 'grid',
padding: 5,
position: 'relative',
},
overlay: {
pointerEvents: 'none',
overflow: 'hidden',
display: 'flex',
width: '100%',
gridRow: '1/2',
gridColumn: '2/2',
zIndex: 100, // needs to be below controls
'& path': {
cursor: 'crosshair',
fill: 'none',
},
const useStyles = makeStyles(theme => ({
spacer: {
gridColumn: '1/2',
gridRow: '2/2',
},
root: {
position: 'relative',
marginBottom: theme.spacing(1),
overflow: 'hidden',
},
viewContainer: {
marginTop: '3px',
},
container: {
display: 'grid',
padding: 5,
position: 'relative',
},
overlay: {
pointerEvents: 'none',
overflow: 'hidden',
display: 'flex',
width: '100%',
gridRow: '1/2',
gridColumn: '2/2',
zIndex: 100, // needs to be below controls
'& path': {
cursor: 'crosshair',
fill: 'none',
},
},

content: {
gridColumn: '2/2',
gridRow: '1/2',
},
content: {
gridColumn: '2/2',
gridRow: '1/2',
},

popover: {
background: '#fff',
maxWidth: 400,
wordBreak: 'break-all',
zIndex: 1000,
border: '1px solid black',
pointerEvents: 'none',
position: 'absolute',
},
}
})
popover: {
background: '#fff',
maxWidth: 400,
wordBreak: 'break-all',
zIndex: 1000,
border: '1px solid black',
pointerEvents: 'none',
position: 'absolute',
},
}))

type Coord = [number, number] | undefined
type Timer = ReturnType<typeof setTimeout>
Expand Down
3 changes: 2 additions & 1 deletion plugins/dotplot-view/src/DotplotView/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,8 @@ export default function stateModelFactory(pluginManager: PluginManager) {
.map(track => {
const trackConf = track.configuration
return trackConf.displays.find(
display => display.type === 'LinearSyntenyDisplay',
(display: { type: string }) =>
display.type === 'LinearSyntenyDisplay',
)
})
.filter(f => !!f)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const ImportForm = observer(({ model }: { model: LGV }) => {
error: modelError,
} = model
const [selectedAsm, setSelectedAsm] = useState<string>(assemblyNames[0])
const [error, setError] = useState<Error | undefined>(modelError)
const [error, setError] = useState<Error | string | undefined>(modelError)
const message = !assemblyNames.length ? 'No configured assemblies' : ''
const searchScope = model.searchScope(selectedAsm)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ test('can perform bpToPx in a way that makes sense on things that happen outside
expect(model.hideHeaderOverview).toEqual(true)
model.toggleHeaderOverview()
model.setError(Error('pxToBp failed to map to a region'))
expect(model.error?.message).toEqual('pxToBp failed to map to a region')
expect(`${model.error}`).toEqual('pxToBp failed to map to a region')
})
// determined objectively by looking at
// http://localhost:3000/?config=test_data%2Fconfig_demo.json&session=share-Se2K5q_Jog&password=qT9on
Expand Down

0 comments on commit 83e437e

Please sign in to comment.