@jbrowse/plugin-linear-genome-view 1.7.9 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (272) hide show
  1. package/dist/BaseLinearDisplay/components/BaseLinearDisplay.d.ts +1 -5
  2. package/dist/BaseLinearDisplay/components/BaseLinearDisplay.js +118 -226
  3. package/dist/BaseLinearDisplay/components/BaseLinearDisplay.js.map +1 -0
  4. package/dist/BaseLinearDisplay/components/Block.js +53 -74
  5. package/dist/BaseLinearDisplay/components/Block.js.map +1 -0
  6. package/dist/BaseLinearDisplay/components/LinearBlocks.d.ts +11 -1
  7. package/dist/BaseLinearDisplay/components/LinearBlocks.js +64 -103
  8. package/dist/BaseLinearDisplay/components/LinearBlocks.js.map +1 -0
  9. package/dist/BaseLinearDisplay/components/ServerSideRenderedBlockContent.js +145 -175
  10. package/dist/BaseLinearDisplay/components/ServerSideRenderedBlockContent.js.map +1 -0
  11. package/dist/BaseLinearDisplay/components/Tooltip.d.ts +8 -0
  12. package/dist/BaseLinearDisplay/components/Tooltip.js +118 -0
  13. package/dist/BaseLinearDisplay/components/Tooltip.js.map +1 -0
  14. package/dist/BaseLinearDisplay/index.js +13 -40
  15. package/dist/BaseLinearDisplay/index.js.map +1 -0
  16. package/dist/BaseLinearDisplay/models/BaseLinearDisplayModel.d.ts +20 -15
  17. package/dist/BaseLinearDisplay/models/BaseLinearDisplayModel.js +605 -683
  18. package/dist/BaseLinearDisplay/models/BaseLinearDisplayModel.js.map +1 -0
  19. package/dist/BaseLinearDisplay/models/baseLinearDisplayConfigSchema.js +15 -22
  20. package/dist/BaseLinearDisplay/models/baseLinearDisplayConfigSchema.js.map +1 -0
  21. package/dist/BaseLinearDisplay/models/serverSideRenderedBlock.d.ts +7 -8
  22. package/dist/BaseLinearDisplay/models/serverSideRenderedBlock.js +266 -312
  23. package/dist/BaseLinearDisplay/models/serverSideRenderedBlock.js.map +1 -0
  24. package/dist/LinearBareDisplay/configSchema.js +11 -17
  25. package/dist/LinearBareDisplay/configSchema.js.map +1 -0
  26. package/dist/LinearBareDisplay/index.js +7 -20
  27. package/dist/LinearBareDisplay/index.js.map +1 -0
  28. package/dist/LinearBareDisplay/model.d.ts +16 -14
  29. package/dist/LinearBareDisplay/model.js +36 -42
  30. package/dist/LinearBareDisplay/model.js.map +1 -0
  31. package/dist/LinearBasicDisplay/components/SetMaxHeight.d.ts +1 -1
  32. package/dist/LinearBasicDisplay/components/SetMaxHeight.js +76 -85
  33. package/dist/LinearBasicDisplay/components/SetMaxHeight.js.map +1 -0
  34. package/dist/LinearBasicDisplay/configSchema.js +15 -23
  35. package/dist/LinearBasicDisplay/configSchema.js.map +1 -0
  36. package/dist/LinearBasicDisplay/index.js +10 -22
  37. package/dist/LinearBasicDisplay/index.js.map +1 -0
  38. package/dist/LinearBasicDisplay/model.d.ts +20 -15
  39. package/dist/LinearBasicDisplay/model.js +180 -159
  40. package/dist/LinearBasicDisplay/model.js.map +1 -0
  41. package/dist/LinearGenomeView/components/CenterLine.d.ts +2 -8
  42. package/dist/LinearGenomeView/components/CenterLine.js +60 -74
  43. package/dist/LinearGenomeView/components/CenterLine.js.map +1 -0
  44. package/dist/LinearGenomeView/components/ExportSvgDialog.js +141 -141
  45. package/dist/LinearGenomeView/components/ExportSvgDialog.js.map +1 -0
  46. package/dist/LinearGenomeView/components/Header.js +70 -123
  47. package/dist/LinearGenomeView/components/Header.js.map +1 -0
  48. package/dist/LinearGenomeView/components/HelpDialog.d.ts +0 -1
  49. package/dist/LinearGenomeView/components/HelpDialog.js +62 -45
  50. package/dist/LinearGenomeView/components/HelpDialog.js.map +1 -0
  51. package/dist/LinearGenomeView/components/ImportForm.js +223 -320
  52. package/dist/LinearGenomeView/components/ImportForm.js.map +1 -0
  53. package/dist/LinearGenomeView/components/LinearGenomeView.js +64 -120
  54. package/dist/LinearGenomeView/components/LinearGenomeView.js.map +1 -0
  55. package/dist/LinearGenomeView/components/LinearGenomeViewSvg.js +198 -337
  56. package/dist/LinearGenomeView/components/LinearGenomeViewSvg.js.map +1 -0
  57. package/dist/LinearGenomeView/components/MiniControls.js +64 -78
  58. package/dist/LinearGenomeView/components/MiniControls.js.map +1 -0
  59. package/dist/LinearGenomeView/components/OverviewRubberBand.js +226 -293
  60. package/dist/LinearGenomeView/components/OverviewRubberBand.js.map +1 -0
  61. package/dist/LinearGenomeView/components/OverviewScaleBar.d.ts +24 -8
  62. package/dist/LinearGenomeView/components/OverviewScaleBar.js +277 -365
  63. package/dist/LinearGenomeView/components/OverviewScaleBar.js.map +1 -0
  64. package/dist/LinearGenomeView/components/RefNameAutocomplete.d.ts +1 -1
  65. package/dist/LinearGenomeView/components/RefNameAutocomplete.js +237 -324
  66. package/dist/LinearGenomeView/components/RefNameAutocomplete.js.map +1 -0
  67. package/dist/LinearGenomeView/components/RubberBand.js +229 -296
  68. package/dist/LinearGenomeView/components/RubberBand.js.map +1 -0
  69. package/dist/LinearGenomeView/components/Ruler.js +45 -90
  70. package/dist/LinearGenomeView/components/Ruler.js.map +1 -0
  71. package/dist/LinearGenomeView/components/ScaleBar.d.ts +8 -399
  72. package/dist/LinearGenomeView/components/ScaleBar.js +121 -167
  73. package/dist/LinearGenomeView/components/ScaleBar.js.map +1 -0
  74. package/dist/LinearGenomeView/components/SearchBox.js +158 -205
  75. package/dist/LinearGenomeView/components/SearchBox.js.map +1 -0
  76. package/dist/LinearGenomeView/components/SearchResultsDialog.d.ts +0 -1
  77. package/dist/LinearGenomeView/components/SearchResultsDialog.js +105 -150
  78. package/dist/LinearGenomeView/components/SearchResultsDialog.js.map +1 -0
  79. package/dist/LinearGenomeView/components/SequenceDialog.js +219 -272
  80. package/dist/LinearGenomeView/components/SequenceDialog.js.map +1 -0
  81. package/dist/LinearGenomeView/components/TrackContainer.js +116 -156
  82. package/dist/LinearGenomeView/components/TrackContainer.js.map +1 -0
  83. package/dist/LinearGenomeView/components/TrackLabel.d.ts +6 -42
  84. package/dist/LinearGenomeView/components/TrackLabel.js +115 -150
  85. package/dist/LinearGenomeView/components/TrackLabel.js.map +1 -0
  86. package/dist/LinearGenomeView/components/TracksContainer.d.ts +1 -1
  87. package/dist/LinearGenomeView/components/TracksContainer.js +172 -199
  88. package/dist/LinearGenomeView/components/TracksContainer.js.map +1 -0
  89. package/dist/LinearGenomeView/components/VerticalGuides.d.ts +2 -3
  90. package/dist/LinearGenomeView/components/VerticalGuides.js +66 -104
  91. package/dist/LinearGenomeView/components/VerticalGuides.js.map +1 -0
  92. package/dist/LinearGenomeView/components/ZoomControls.js +72 -87
  93. package/dist/LinearGenomeView/components/ZoomControls.js.map +1 -0
  94. package/dist/LinearGenomeView/components/util.d.ts +12 -0
  95. package/dist/LinearGenomeView/components/util.js +95 -13
  96. package/dist/LinearGenomeView/components/util.js.map +1 -0
  97. package/dist/LinearGenomeView/index.d.ts +6 -11
  98. package/dist/LinearGenomeView/index.js +1163 -1387
  99. package/dist/LinearGenomeView/index.js.map +1 -0
  100. package/dist/LinearGenomeView/util.js +76 -83
  101. package/dist/LinearGenomeView/util.js.map +1 -0
  102. package/dist/index.d.ts +101 -51
  103. package/dist/index.js +225 -284
  104. package/dist/index.js.map +1 -0
  105. package/esm/BaseLinearDisplay/components/BaseLinearDisplay.d.ts +9 -0
  106. package/esm/BaseLinearDisplay/components/BaseLinearDisplay.js +68 -0
  107. package/esm/BaseLinearDisplay/components/BaseLinearDisplay.js.map +1 -0
  108. package/esm/BaseLinearDisplay/components/Block.d.ts +15 -0
  109. package/esm/BaseLinearDisplay/components/Block.js +46 -0
  110. package/esm/BaseLinearDisplay/components/Block.js.map +1 -0
  111. package/esm/BaseLinearDisplay/components/LinearBlocks.d.ts +22 -0
  112. package/esm/BaseLinearDisplay/components/LinearBlocks.js +62 -0
  113. package/esm/BaseLinearDisplay/components/LinearBlocks.js.map +1 -0
  114. package/esm/BaseLinearDisplay/components/ServerSideRenderedBlockContent.d.ts +4 -0
  115. package/esm/BaseLinearDisplay/components/ServerSideRenderedBlockContent.js +113 -0
  116. package/esm/BaseLinearDisplay/components/ServerSideRenderedBlockContent.js.map +1 -0
  117. package/esm/BaseLinearDisplay/components/Tooltip.d.ts +8 -0
  118. package/esm/BaseLinearDisplay/components/Tooltip.js +64 -0
  119. package/esm/BaseLinearDisplay/components/Tooltip.js.map +1 -0
  120. package/esm/BaseLinearDisplay/index.d.ts +5 -0
  121. package/esm/BaseLinearDisplay/index.js +4 -0
  122. package/esm/BaseLinearDisplay/index.js.map +1 -0
  123. package/esm/BaseLinearDisplay/models/BaseLinearDisplayModel.d.ts +232 -0
  124. package/esm/BaseLinearDisplay/models/BaseLinearDisplayModel.js +541 -0
  125. package/esm/BaseLinearDisplay/models/BaseLinearDisplayModel.js.map +1 -0
  126. package/esm/BaseLinearDisplay/models/baseLinearDisplayConfigSchema.d.ts +1 -0
  127. package/esm/BaseLinearDisplay/models/baseLinearDisplayConfigSchema.js +14 -0
  128. package/esm/BaseLinearDisplay/models/baseLinearDisplayConfigSchema.js.map +1 -0
  129. package/esm/BaseLinearDisplay/models/serverSideRenderedBlock.d.ts +96 -0
  130. package/esm/BaseLinearDisplay/models/serverSideRenderedBlock.js +225 -0
  131. package/esm/BaseLinearDisplay/models/serverSideRenderedBlock.js.map +1 -0
  132. package/esm/LinearBareDisplay/configSchema.d.ts +2 -0
  133. package/esm/LinearBareDisplay/configSchema.js +9 -0
  134. package/esm/LinearBareDisplay/configSchema.js.map +1 -0
  135. package/esm/LinearBareDisplay/index.d.ts +2 -0
  136. package/esm/LinearBareDisplay/index.js +3 -0
  137. package/esm/LinearBareDisplay/index.js.map +1 -0
  138. package/esm/LinearBareDisplay/model.d.ts +194 -0
  139. package/esm/LinearBareDisplay/model.js +28 -0
  140. package/esm/LinearBareDisplay/model.js.map +1 -0
  141. package/esm/LinearBasicDisplay/components/SetMaxHeight.d.ts +10 -0
  142. package/esm/LinearBasicDisplay/components/SetMaxHeight.js +40 -0
  143. package/esm/LinearBasicDisplay/components/SetMaxHeight.js.map +1 -0
  144. package/esm/LinearBasicDisplay/configSchema.d.ts +2 -0
  145. package/esm/LinearBasicDisplay/configSchema.js +14 -0
  146. package/esm/LinearBasicDisplay/configSchema.js.map +1 -0
  147. package/esm/LinearBasicDisplay/index.d.ts +2 -0
  148. package/esm/LinearBasicDisplay/index.js +3 -0
  149. package/esm/LinearBasicDisplay/index.js.map +1 -0
  150. package/esm/LinearBasicDisplay/model.d.ts +218 -0
  151. package/esm/LinearBasicDisplay/model.js +127 -0
  152. package/esm/LinearBasicDisplay/model.js.map +1 -0
  153. package/esm/LinearGenomeView/components/CenterLine.d.ts +8 -0
  154. package/esm/LinearGenomeView/components/CenterLine.js +40 -0
  155. package/esm/LinearGenomeView/components/CenterLine.js.map +1 -0
  156. package/esm/LinearGenomeView/components/ExportSvgDialog.d.ts +6 -0
  157. package/esm/LinearGenomeView/components/ExportSvgDialog.js +52 -0
  158. package/esm/LinearGenomeView/components/ExportSvgDialog.js.map +1 -0
  159. package/esm/LinearGenomeView/components/Header.d.ts +7 -0
  160. package/esm/LinearGenomeView/components/Header.js +81 -0
  161. package/esm/LinearGenomeView/components/Header.js.map +1 -0
  162. package/esm/LinearGenomeView/components/HelpDialog.d.ts +4 -0
  163. package/esm/LinearGenomeView/components/HelpDialog.js +58 -0
  164. package/esm/LinearGenomeView/components/HelpDialog.js.map +1 -0
  165. package/esm/LinearGenomeView/components/ImportForm.d.ts +7 -0
  166. package/esm/LinearGenomeView/components/ImportForm.js +141 -0
  167. package/esm/LinearGenomeView/components/ImportForm.js.map +1 -0
  168. package/esm/LinearGenomeView/components/LinearGenomeView.d.ts +7 -0
  169. package/esm/LinearGenomeView/components/LinearGenomeView.js +67 -0
  170. package/esm/LinearGenomeView/components/LinearGenomeView.js.map +1 -0
  171. package/esm/LinearGenomeView/components/LinearGenomeViewSvg.d.ts +4 -0
  172. package/esm/LinearGenomeView/components/LinearGenomeViewSvg.js +132 -0
  173. package/esm/LinearGenomeView/components/LinearGenomeViewSvg.js.map +1 -0
  174. package/esm/LinearGenomeView/components/MiniControls.d.ts +6 -0
  175. package/esm/LinearGenomeView/components/MiniControls.js +25 -0
  176. package/esm/LinearGenomeView/components/MiniControls.js.map +1 -0
  177. package/esm/LinearGenomeView/components/OverviewRubberBand.d.ts +22 -0
  178. package/esm/LinearGenomeView/components/OverviewRubberBand.js +194 -0
  179. package/esm/LinearGenomeView/components/OverviewRubberBand.js.map +1 -0
  180. package/esm/LinearGenomeView/components/OverviewScaleBar.d.ts +148 -0
  181. package/esm/LinearGenomeView/components/OverviewScaleBar.js +287 -0
  182. package/esm/LinearGenomeView/components/OverviewScaleBar.js.map +1 -0
  183. package/esm/LinearGenomeView/components/RefNameAutocomplete.d.ts +22 -0
  184. package/esm/LinearGenomeView/components/RefNameAutocomplete.js +136 -0
  185. package/esm/LinearGenomeView/components/RefNameAutocomplete.js.map +1 -0
  186. package/esm/LinearGenomeView/components/RubberBand.d.ts +9 -0
  187. package/esm/LinearGenomeView/components/RubberBand.js +198 -0
  188. package/esm/LinearGenomeView/components/RubberBand.js.map +1 -0
  189. package/esm/LinearGenomeView/components/Ruler.d.ts +27 -0
  190. package/esm/LinearGenomeView/components/Ruler.js +50 -0
  191. package/esm/LinearGenomeView/components/Ruler.js.map +1 -0
  192. package/esm/LinearGenomeView/components/ScaleBar.d.ts +10 -0
  193. package/esm/LinearGenomeView/components/ScaleBar.js +112 -0
  194. package/esm/LinearGenomeView/components/ScaleBar.js.map +1 -0
  195. package/esm/LinearGenomeView/components/SearchBox.d.ts +8 -0
  196. package/esm/LinearGenomeView/components/SearchBox.js +94 -0
  197. package/esm/LinearGenomeView/components/SearchBox.js.map +1 -0
  198. package/esm/LinearGenomeView/components/SearchResultsDialog.d.ts +7 -0
  199. package/esm/LinearGenomeView/components/SearchResultsDialog.js +107 -0
  200. package/esm/LinearGenomeView/components/SearchResultsDialog.js.map +1 -0
  201. package/esm/LinearGenomeView/components/SequenceDialog.d.ts +8 -0
  202. package/esm/LinearGenomeView/components/SequenceDialog.js +147 -0
  203. package/esm/LinearGenomeView/components/SequenceDialog.js.map +1 -0
  204. package/esm/LinearGenomeView/components/TrackContainer.d.ts +9 -0
  205. package/esm/LinearGenomeView/components/TrackContainer.js +109 -0
  206. package/esm/LinearGenomeView/components/TrackContainer.js.map +1 -0
  207. package/esm/LinearGenomeView/components/TrackLabel.d.ts +8 -0
  208. package/esm/LinearGenomeView/components/TrackLabel.js +89 -0
  209. package/esm/LinearGenomeView/components/TrackLabel.js.map +1 -0
  210. package/esm/LinearGenomeView/components/TracksContainer.d.ts +10 -0
  211. package/esm/LinearGenomeView/components/TracksContainer.js +142 -0
  212. package/esm/LinearGenomeView/components/TracksContainer.js.map +1 -0
  213. package/esm/LinearGenomeView/components/VerticalGuides.d.ts +8 -0
  214. package/esm/LinearGenomeView/components/VerticalGuides.js +71 -0
  215. package/esm/LinearGenomeView/components/VerticalGuides.js.map +1 -0
  216. package/esm/LinearGenomeView/components/ZoomControls.d.ts +7 -0
  217. package/esm/LinearGenomeView/components/ZoomControls.js +32 -0
  218. package/esm/LinearGenomeView/components/ZoomControls.js.map +1 -0
  219. package/esm/LinearGenomeView/components/util.d.ts +14 -0
  220. package/esm/LinearGenomeView/components/util.js +17 -0
  221. package/esm/LinearGenomeView/components/util.js.map +1 -0
  222. package/esm/LinearGenomeView/index.d.ts +288 -0
  223. package/esm/LinearGenomeView/index.js +1124 -0
  224. package/esm/LinearGenomeView/index.js.map +1 -0
  225. package/esm/LinearGenomeView/util.d.ts +14 -0
  226. package/esm/LinearGenomeView/util.js +62 -0
  227. package/esm/LinearGenomeView/util.js.map +1 -0
  228. package/esm/index.d.ts +615 -0
  229. package/esm/index.js +127 -0
  230. package/esm/index.js.map +1 -0
  231. package/package.json +21 -13
  232. package/src/BaseLinearDisplay/components/BaseLinearDisplay.tsx +6 -90
  233. package/src/BaseLinearDisplay/components/Block.tsx +5 -5
  234. package/src/BaseLinearDisplay/components/LinearBlocks.tsx +4 -4
  235. package/src/BaseLinearDisplay/components/ServerSideRenderedBlockContent.tsx +7 -8
  236. package/src/BaseLinearDisplay/components/Tooltip.tsx +107 -0
  237. package/src/BaseLinearDisplay/models/BaseLinearDisplayModel.tsx +16 -8
  238. package/src/BaseLinearDisplay/models/serverSideRenderedBlock.ts +1 -1
  239. package/src/LinearBasicDisplay/components/SetMaxHeight.tsx +10 -7
  240. package/src/LinearBasicDisplay/model.ts +21 -15
  241. package/src/LinearGenomeView/components/CenterLine.tsx +6 -11
  242. package/src/LinearGenomeView/components/ExportSvgDialog.tsx +5 -5
  243. package/src/LinearGenomeView/components/Header.tsx +12 -16
  244. package/src/LinearGenomeView/components/HelpDialog.tsx +10 -9
  245. package/src/LinearGenomeView/components/ImportForm.tsx +24 -37
  246. package/src/LinearGenomeView/components/LinearGenomeView.test.js +18 -8
  247. package/src/LinearGenomeView/components/LinearGenomeView.tsx +20 -13
  248. package/src/LinearGenomeView/components/MiniControls.tsx +29 -40
  249. package/src/LinearGenomeView/components/OverviewRubberBand.tsx +6 -10
  250. package/src/LinearGenomeView/components/OverviewScaleBar.tsx +103 -93
  251. package/src/LinearGenomeView/components/RefNameAutocomplete.tsx +13 -44
  252. package/src/LinearGenomeView/components/RubberBand.tsx +12 -17
  253. package/src/LinearGenomeView/components/Ruler.tsx +5 -11
  254. package/src/LinearGenomeView/components/ScaleBar.tsx +27 -34
  255. package/src/LinearGenomeView/components/SearchBox.tsx +22 -32
  256. package/src/LinearGenomeView/components/SearchResultsDialog.tsx +7 -7
  257. package/src/LinearGenomeView/components/SequenceDialog.tsx +9 -9
  258. package/src/LinearGenomeView/components/TrackContainer.tsx +12 -12
  259. package/src/LinearGenomeView/components/TrackLabel.tsx +37 -50
  260. package/src/LinearGenomeView/components/TracksContainer.tsx +8 -13
  261. package/src/LinearGenomeView/components/VerticalGuides.tsx +9 -11
  262. package/src/LinearGenomeView/components/ZoomControls.tsx +12 -13
  263. package/src/LinearGenomeView/components/__snapshots__/LinearGenomeView.test.js.snap +504 -568
  264. package/src/LinearGenomeView/components/util.ts +43 -0
  265. package/src/LinearGenomeView/index.test.ts +21 -5
  266. package/src/LinearGenomeView/index.tsx +101 -88
  267. package/src/index.ts +36 -31
  268. package/dist/LinearBareDisplay/index.test.js +0 -33
  269. package/dist/LinearGenomeView/components/LinearGenomeView.test.js +0 -234
  270. package/dist/LinearGenomeView/components/ScaleBar.test.js +0 -180
  271. package/dist/LinearGenomeView/index.test.js +0 -1170
  272. package/dist/LinearGenomeView/util.test.js +0 -78
@@ -9,12 +9,12 @@ import {
9
9
  IconButton,
10
10
  Typography,
11
11
  TextField,
12
- makeStyles,
13
- } from '@material-ui/core'
12
+ } from '@mui/material'
13
+ import { makeStyles } from 'tss-react/mui'
14
14
 
15
- import CloseIcon from '@material-ui/icons/Close'
15
+ import CloseIcon from '@mui/icons-material/Close'
16
16
 
17
- const useStyles = makeStyles(theme => ({
17
+ const useStyles = makeStyles()(theme => ({
18
18
  root: {
19
19
  width: 500,
20
20
  },
@@ -29,15 +29,17 @@ const useStyles = makeStyles(theme => ({
29
29
  },
30
30
  }))
31
31
 
32
- function SetMaxHeightDlg(props: {
32
+ function SetMaxHeightDlg({
33
+ model,
34
+ handleClose,
35
+ }: {
33
36
  model: {
34
37
  maxHeight?: number
35
38
  setMaxHeight: Function
36
39
  }
37
40
  handleClose: () => void
38
41
  }) {
39
- const { model, handleClose } = props
40
- const classes = useStyles()
42
+ const { classes } = useStyles()
41
43
  const { maxHeight = '' } = model
42
44
  const [max, setMax] = useState(`${maxHeight}`)
43
45
 
@@ -54,6 +56,7 @@ function SetMaxHeightDlg(props: {
54
56
  aria-label="close"
55
57
  className={classes.closeButton}
56
58
  onClick={handleClose}
59
+ size="large"
57
60
  >
58
61
  <CloseIcon />
59
62
  </IconButton>
@@ -9,7 +9,7 @@ import { MenuItem } from '@jbrowse/core/ui'
9
9
  import { types, getEnv, Instance } from 'mobx-state-tree'
10
10
 
11
11
  // icons
12
- import VisibilityIcon from '@material-ui/icons/Visibility'
12
+ import VisibilityIcon from '@mui/icons-material/Visibility'
13
13
 
14
14
  // locals
15
15
  import { BaseLinearDisplay } from '../BaseLinearDisplay'
@@ -42,7 +42,7 @@ const stateModelFactory = (configSchema: AnyConfigurationSchemaType) =>
42
42
  get showDescriptions() {
43
43
  return (
44
44
  self.trackShowDescriptions ??
45
- getConf(self, ['renderer', 'showLabels'])
45
+ getConf(self, ['renderer', 'showDescriptions'])
46
46
  )
47
47
  },
48
48
 
@@ -51,19 +51,23 @@ const stateModelFactory = (configSchema: AnyConfigurationSchemaType) =>
51
51
  },
52
52
 
53
53
  get displayMode() {
54
- const displayMode = getConf(self, ['renderer', 'displayMode'])
55
- return self.trackDisplayMode ?? displayMode
54
+ return (
55
+ self.trackDisplayMode ?? getConf(self, ['renderer', 'displayMode'])
56
+ )
56
57
  },
58
+ }))
59
+ .views(self => ({
57
60
  get rendererConfig() {
58
61
  const configBlob = getConf(self, ['renderer']) || {}
62
+ const config = configBlob as Omit<typeof configBlob, symbol>
59
63
 
60
64
  return self.rendererType.configSchema.create(
61
65
  {
62
- ...configBlob,
63
- showLabels: this.showLabels,
64
- showDescriptions: this.showDescriptions,
65
- displayMode: this.displayMode,
66
- maxHeight: this.maxHeight,
66
+ ...config,
67
+ showLabels: self.showLabels,
68
+ showDescriptions: self.showDescriptions,
69
+ displayMode: self.displayMode,
70
+ maxHeight: self.maxHeight,
67
71
  },
68
72
  getEnv(self),
69
73
  )
@@ -92,9 +96,13 @@ const stateModelFactory = (configSchema: AnyConfigurationSchemaType) =>
92
96
  return {
93
97
  renderProps() {
94
98
  const config = self.rendererConfig
99
+ const superProps = superRenderProps()
100
+
101
+ const superPropsOmit = superProps as Omit<typeof superProps, symbol>
95
102
 
96
103
  return {
97
- ...superRenderProps(),
104
+ ...superPropsOmit,
105
+
98
106
  config,
99
107
  }
100
108
  },
@@ -116,9 +124,7 @@ const stateModelFactory = (configSchema: AnyConfigurationSchemaType) =>
116
124
  icon: VisibilityIcon,
117
125
  type: 'checkbox',
118
126
  checked: self.showDescriptions,
119
- onClick: () => {
120
- self.toggleShowDescriptions()
121
- },
127
+ onClick: () => self.toggleShowDescriptions(),
122
128
  },
123
129
  {
124
130
  label: 'Display mode',
@@ -138,9 +144,9 @@ const stateModelFactory = (configSchema: AnyConfigurationSchemaType) =>
138
144
  {
139
145
  label: 'Set max height',
140
146
  onClick: () => {
141
- getSession(self).queueDialog(doneCallback => [
147
+ getSession(self).queueDialog(handleClose => [
142
148
  SetMaxHeightDlg,
143
- { model: self, handleClose: doneCallback },
149
+ { model: self, handleClose },
144
150
  ])
145
151
  },
146
152
  },
@@ -1,12 +1,11 @@
1
- import { makeStyles } from '@material-ui/core/styles'
2
- import { observer, PropTypes as MobxPropTypes } from 'mobx-react'
3
1
  import React, { useRef } from 'react'
4
- import { Instance } from 'mobx-state-tree'
5
- import { LinearGenomeViewStateModel } from '..'
2
+ import { makeStyles } from 'tss-react/mui'
3
+ import { observer } from 'mobx-react'
4
+ import { LinearGenomeViewModel } from '..'
6
5
 
7
- type LGV = Instance<LinearGenomeViewStateModel>
6
+ type LGV = LinearGenomeViewModel
8
7
 
9
- const useStyles = makeStyles(() => ({
8
+ const useStyles = makeStyles()(() => ({
10
9
  centerLineContainer: {
11
10
  background: 'transparent',
12
11
  height: '100%',
@@ -28,7 +27,7 @@ const useStyles = makeStyles(() => ({
28
27
  function CenterLine({ model }: { model: LGV }) {
29
28
  const { bpPerPx, centerLineInfo, trackHeights, tracks, width } = model
30
29
  const ref = useRef<HTMLDivElement>(null)
31
- const classes = useStyles()
30
+ const { classes } = useStyles()
32
31
  const startingPosition = width / 2
33
32
 
34
33
  return tracks.length ? (
@@ -63,8 +62,4 @@ function CenterLine({ model }: { model: LGV }) {
63
62
  ) : null
64
63
  }
65
64
 
66
- CenterLine.propTypes = {
67
- model: MobxPropTypes.objectOrObservableObject.isRequired,
68
- }
69
-
70
65
  export default observer(CenterLine)
@@ -1,4 +1,5 @@
1
1
  import React, { useState } from 'react'
2
+ import { makeStyles } from 'tss-react/mui'
2
3
  import {
3
4
  Button,
4
5
  Checkbox,
@@ -11,13 +12,12 @@ import {
11
12
  IconButton,
12
13
  TextField,
13
14
  Typography,
14
- makeStyles,
15
- } from '@material-ui/core'
15
+ } from '@mui/material'
16
16
  import { ErrorMessage } from '@jbrowse/core/ui'
17
- import CloseIcon from '@material-ui/icons/Close'
17
+ import CloseIcon from '@mui/icons-material/Close'
18
18
  import { LinearGenomeViewModel as LGV } from '..'
19
19
 
20
- const useStyles = makeStyles(theme => ({
20
+ const useStyles = makeStyles()(theme => ({
21
21
  closeButton: {
22
22
  position: 'absolute',
23
23
  right: theme.spacing(1),
@@ -48,7 +48,7 @@ export default function ExportSvgDlg({
48
48
  const [loading, setLoading] = useState(false)
49
49
  const [filename, setFilename] = useState('jbrowse.svg')
50
50
  const [error, setError] = useState<unknown>()
51
- const classes = useStyles()
51
+ const { classes } = useStyles()
52
52
  return (
53
53
  <Dialog open onClose={handleClose}>
54
54
  <DialogTitle>
@@ -1,18 +1,13 @@
1
1
  import React from 'react'
2
2
  import { observer } from 'mobx-react'
3
- import {
4
- Button,
5
- FormGroup,
6
- Typography,
7
- makeStyles,
8
- alpha,
9
- } from '@material-ui/core'
10
- import SearchBox from './SearchBox'
3
+ import { Button, FormGroup, Typography, alpha } from '@mui/material'
4
+ import { makeStyles } from 'tss-react/mui'
5
+ import { getBpDisplayStr } from '@jbrowse/core/util'
11
6
 
12
7
  // icons
13
8
  import { TrackSelector as TrackSelectorIcon } from '@jbrowse/core/ui/Icons'
14
- import ArrowForwardIcon from '@material-ui/icons/ArrowForward'
15
- import ArrowBackIcon from '@material-ui/icons/ArrowBack'
9
+ import ArrowForwardIcon from '@mui/icons-material/ArrowForward'
10
+ import ArrowBackIcon from '@mui/icons-material/ArrowBack'
16
11
 
17
12
  // locals
18
13
  import {
@@ -23,9 +18,10 @@ import {
23
18
  } from '..'
24
19
  import OverviewScaleBar from './OverviewScaleBar'
25
20
  import ZoomControls from './ZoomControls'
21
+ import SearchBox from './SearchBox'
26
22
 
27
23
  type LGV = LinearGenomeViewModel
28
- const useStyles = makeStyles(theme => ({
24
+ const useStyles = makeStyles()(theme => ({
29
25
  headerBar: {
30
26
  height: HEADER_BAR_HEIGHT,
31
27
  display: 'flex',
@@ -59,7 +55,7 @@ const useStyles = makeStyles(theme => ({
59
55
  }))
60
56
 
61
57
  const HeaderButtons = observer(({ model }: { model: LGV }) => {
62
- const classes = useStyles()
58
+ const { classes } = useStyles()
63
59
  return (
64
60
  <Button
65
61
  onClick={model.activateTrackSelector}
@@ -74,7 +70,7 @@ const HeaderButtons = observer(({ model }: { model: LGV }) => {
74
70
  })
75
71
 
76
72
  function PanControls({ model }: { model: LGV }) {
77
- const classes = useStyles()
73
+ const { classes } = useStyles()
78
74
  return (
79
75
  <>
80
76
  <Button
@@ -96,17 +92,17 @@ function PanControls({ model }: { model: LGV }) {
96
92
  }
97
93
 
98
94
  const RegionWidth = observer(({ model }: { model: LGV }) => {
99
- const classes = useStyles()
95
+ const { classes } = useStyles()
100
96
  const { coarseTotalBp } = model
101
97
  return (
102
98
  <Typography variant="body2" color="textSecondary" className={classes.bp}>
103
- {Math.round(coarseTotalBp).toLocaleString('en-US')} bp
99
+ {getBpDisplayStr(coarseTotalBp)}
104
100
  </Typography>
105
101
  )
106
102
  })
107
103
 
108
104
  const Controls = ({ model }: { model: LGV }) => {
109
- const classes = useStyles()
105
+ const { classes } = useStyles()
110
106
  return (
111
107
  <div className={classes.headerBar}>
112
108
  <HeaderButtons model={model} />
@@ -7,11 +7,11 @@ import {
7
7
  DialogTitle,
8
8
  Divider,
9
9
  IconButton,
10
- makeStyles,
11
- } from '@material-ui/core'
12
- import CloseIcon from '@material-ui/icons/Close'
10
+ } from '@mui/material'
11
+ import { makeStyles } from 'tss-react/mui'
12
+ import CloseIcon from '@mui/icons-material/Close'
13
13
 
14
- export const useStyles = makeStyles(theme => ({
14
+ const useStyles = makeStyles()(theme => ({
15
15
  closeButton: {
16
16
  position: 'absolute',
17
17
  right: theme.spacing(1),
@@ -25,18 +25,15 @@ export default function HelpDialog({
25
25
  }: {
26
26
  handleClose: () => void
27
27
  }) {
28
- const classes = useStyles()
28
+ const { classes } = useStyles()
29
29
  return (
30
30
  <Dialog open maxWidth="xl" onClose={handleClose}>
31
31
  <DialogTitle>
32
32
  Using the search box
33
33
  {handleClose ? (
34
34
  <IconButton
35
- data-testid="close-resultsDialog"
36
35
  className={classes.closeButton}
37
- onClick={() => {
38
- handleClose()
39
- }}
36
+ onClick={() => handleClose()}
40
37
  >
41
38
  <CloseIcon />
42
39
  </IconButton>
@@ -81,6 +78,10 @@ export default function HelpDialog({
81
78
  <code>chr1:1-100[rev] chr2:1-100</code> - open up the first region
82
79
  in the horizontally flipped orientation
83
80
  </li>
81
+ <li>
82
+ <code>chr1 100 200</code> - use whitespace separated refname, start,
83
+ end
84
+ </li>
84
85
  </ul>
85
86
  </DialogContent>
86
87
  <Divider />
@@ -1,25 +1,19 @@
1
1
  import React, { useState, lazy } from 'react'
2
+ import { makeStyles } from 'tss-react/mui'
2
3
  import { observer } from 'mobx-react'
3
4
  import { getSession } from '@jbrowse/core/util'
4
- import {
5
- Button,
6
- CircularProgress,
7
- Container,
8
- Grid,
9
- makeStyles,
10
- } from '@material-ui/core'
11
- import { SearchType } from '@jbrowse/core/data_adapters/BaseAdapter'
12
- import ErrorMessage from '@jbrowse/core/ui/ErrorMessage'
5
+ import { Button, CircularProgress, Container, Grid } from '@mui/material'
6
+ import { ErrorMessage, AssemblySelector } from '@jbrowse/core/ui'
13
7
  import BaseResult from '@jbrowse/core/TextSearch/BaseResults'
14
- import AssemblySelector from '@jbrowse/core/ui/AssemblySelector'
15
- import CloseIcon from '@material-ui/icons/Close'
8
+ import CloseIcon from '@mui/icons-material/Close'
16
9
 
17
10
  // locals
18
11
  import RefNameAutocomplete from './RefNameAutocomplete'
12
+ import { fetchResults } from './util'
19
13
  import { LinearGenomeViewModel, WIDGET_HEIGHT } from '..'
20
14
  const SearchResultsDialog = lazy(() => import('./SearchResultsDialog'))
21
15
 
22
- const useStyles = makeStyles(theme => ({
16
+ const useStyles = makeStyles()(theme => ({
23
17
  importFormContainer: {
24
18
  padding: theme.spacing(2),
25
19
  },
@@ -34,7 +28,7 @@ const useStyles = makeStyles(theme => ({
34
28
  type LGV = LinearGenomeViewModel
35
29
 
36
30
  const ImportForm = observer(({ model }: { model: LGV }) => {
37
- const classes = useStyles()
31
+ const { classes } = useStyles()
38
32
  const session = getSession(model)
39
33
  const { assemblyNames, assemblyManager, textSearchManager } = session
40
34
  const { rankSearchResults, isSearchDialogDisplayed, error } = model
@@ -57,28 +51,6 @@ const ImportForm = observer(({ model }: { model: LGV }) => {
57
51
  label: value,
58
52
  })
59
53
 
60
- async function fetchResults(query: string, searchType?: SearchType) {
61
- if (!textSearchManager) {
62
- console.warn('No text search manager')
63
- }
64
-
65
- const textSearchResults = await textSearchManager?.search(
66
- {
67
- queryString: query,
68
- searchType,
69
- },
70
- searchScope,
71
- rankSearchResults,
72
- )
73
-
74
- const refNameResults = assembly?.allRefNames
75
- ?.filter(refName => refName.startsWith(query))
76
- .map(r => new BaseResult({ label: r }))
77
- .slice(0, 10)
78
-
79
- return [...(refNameResults || []), ...(textSearchResults || [])]
80
- }
81
-
82
54
  // gets a string as input, or use stored option results from previous query,
83
55
  // then re-query and
84
56
  // 1) if it has multiple results: pop a dialog
@@ -105,7 +77,14 @@ const ImportForm = observer(({ model }: { model: LGV }) => {
105
77
  ) {
106
78
  model.navToLocString(location, selectedAsm)
107
79
  } else {
108
- const results = await fetchResults(input, 'exact')
80
+ const results = await fetchResults({
81
+ queryString: input,
82
+ searchType: 'exact',
83
+ searchScope,
84
+ rankSearchResults,
85
+ textSearchManager,
86
+ assembly,
87
+ })
109
88
  if (results.length > 1) {
110
89
  model.setSearchResults(results, input.toLowerCase())
111
90
  return
@@ -165,7 +144,15 @@ const ImportForm = observer(({ model }: { model: LGV }) => {
165
144
  <CloseIcon style={{ color: 'red' }} />
166
145
  ) : value ? (
167
146
  <RefNameAutocomplete
168
- fetchResults={fetchResults}
147
+ fetchResults={queryString =>
148
+ fetchResults({
149
+ queryString,
150
+ assembly,
151
+ textSearchManager,
152
+ rankSearchResults,
153
+ searchScope,
154
+ })
155
+ }
169
156
  model={model}
170
157
  assemblyName={assemblyError ? undefined : selectedAsm}
171
158
  value={value}
@@ -35,11 +35,12 @@ describe('<LinearGenomeView />', () => {
35
35
  model.setWidth(800)
36
36
  const { findByText } = render(<LinearGenomeView model={model} />)
37
37
  expect(model.displayedRegions.length).toEqual(0)
38
- fireEvent.click(await findByText('Open'))
39
- await waitFor(() => {
40
- expect(model.displayedRegions.length).toEqual(1)
41
- })
42
- })
38
+ const elt = await findByText('Open')
39
+ await waitFor(() => expect(elt.getAttribute('disabled')).toBe(null))
40
+ fireEvent.click(elt)
41
+ await waitFor(() => expect(model.displayedRegions.length).toEqual(1), 15000)
42
+ }, 15000)
43
+
43
44
  it('renders one track, one region', async () => {
44
45
  const session = createTestSession()
45
46
  session.addAssemblyConf(assemblyConf)
@@ -75,13 +76,22 @@ describe('<LinearGenomeView />', () => {
75
76
  })
76
77
  const model = session.views[0]
77
78
  model.setWidth(800)
78
- const { container, findByText } = render(<LinearGenomeView model={model} />)
79
+ const { container, getByPlaceholderText, findByText } = render(
80
+ <LinearGenomeView model={model} />,
81
+ )
79
82
  await findByText('Foo Track')
80
83
  // test needs to wait until it's updated to display 100 bp in the header to
81
84
  // make snapshot pass
82
- await findByText('100 bp')
85
+ await findByText('100bp')
86
+
87
+ await waitFor(() => {
88
+ expect(getByPlaceholderText('Search for location').value).toEqual(
89
+ 'ctgA:1..100',
90
+ )
91
+ })
83
92
  expect(container.firstChild).toMatchSnapshot()
84
93
  })
94
+
85
95
  it('renders two tracks, two regions', async () => {
86
96
  const session = createTestSession()
87
97
  session.addAssemblyConf(assemblyConf)
@@ -145,7 +155,7 @@ describe('<LinearGenomeView />', () => {
145
155
  <LinearGenomeView model={model} />,
146
156
  )
147
157
  await findByText('Foo Track')
148
- await findByText('798 bp')
158
+ await findByText('798bp')
149
159
  await findAllByTestId('svgfeatures')
150
160
 
151
161
  expect(container.firstChild).toMatchSnapshot()
@@ -1,5 +1,6 @@
1
1
  import React from 'react'
2
- import { Button, Paper, Typography, makeStyles } from '@material-ui/core'
2
+ import { Button, Paper, Typography } from '@mui/material'
3
+ import { makeStyles } from 'tss-react/mui'
3
4
  import { TrackSelector as TrackSelectorIcon } from '@jbrowse/core/ui/Icons'
4
5
  import { observer } from 'mobx-react'
5
6
 
@@ -15,7 +16,7 @@ import SearchResultsDialog from './SearchResultsDialog'
15
16
 
16
17
  type LGV = LinearGenomeViewModel
17
18
 
18
- const useStyles = makeStyles(theme => ({
19
+ const useStyles = makeStyles()(theme => ({
19
20
  note: {
20
21
  textAlign: 'center',
21
22
  paddingTop: theme.spacing(1),
@@ -45,7 +46,7 @@ const useStyles = makeStyles(theme => ({
45
46
 
46
47
  const LinearGenomeView = observer(({ model }: { model: LGV }) => {
47
48
  const { tracks, error, hideHeader, initialized, hasDisplayedRegions } = model
48
- const classes = useStyles()
49
+ const { classes } = useStyles()
49
50
 
50
51
  if (!initialized && !error) {
51
52
  return (
@@ -92,16 +93,22 @@ const LinearGenomeView = observer(({ model }: { model: LGV }) => {
92
93
  <TracksContainer model={model}>
93
94
  {!tracks.length ? (
94
95
  <Paper variant="outlined" className={classes.note}>
95
- <Typography>No tracks active.</Typography>
96
- <Button
97
- variant="contained"
98
- color="primary"
99
- onClick={model.activateTrackSelector}
100
- style={{ zIndex: 1000 }}
101
- startIcon={<TrackSelectorIcon />}
102
- >
103
- Open track selector
104
- </Button>
96
+ {!model.hideNoTracksActive ? (
97
+ <>
98
+ <Typography>No tracks active.</Typography>
99
+ <Button
100
+ variant="contained"
101
+ color="primary"
102
+ onClick={model.activateTrackSelector}
103
+ style={{ zIndex: 1000 }}
104
+ startIcon={<TrackSelectorIcon />}
105
+ >
106
+ Open track selector
107
+ </Button>
108
+ </>
109
+ ) : (
110
+ <div style={{ height: '48px' }}></div>
111
+ )}
105
112
  </Paper>
106
113
  ) : (
107
114
  tracks.map(track => (
@@ -1,10 +1,9 @@
1
1
  import React, { useState } from 'react'
2
2
  import { observer } from 'mobx-react'
3
- import IconButton from '@material-ui/core/IconButton'
4
- import ZoomIn from '@material-ui/icons/ZoomIn'
5
- import ZoomOut from '@material-ui/icons/ZoomOut'
6
- import ArrowDown from '@material-ui/icons/KeyboardArrowDown'
7
- import Paper from '@material-ui/core/Paper'
3
+ import { IconButton, Paper } from '@mui/material'
4
+ import ZoomIn from '@mui/icons-material/ZoomIn'
5
+ import ZoomOut from '@mui/icons-material/ZoomOut'
6
+ import ArrowDown from '@mui/icons-material/KeyboardArrowDown'
8
7
  import Menu from '@jbrowse/core/ui/Menu'
9
8
  import { LinearGenomeViewModel } from '..'
10
9
 
@@ -14,38 +13,30 @@ const MiniControls = observer((props: { model: LinearGenomeViewModel }) => {
14
13
  const [anchorEl, setAnchorEl] = useState<HTMLElement>()
15
14
 
16
15
  return (
17
- <>
18
- <Paper style={{ background: '#aaa7' }}>
19
- <IconButton
20
- color="secondary"
21
- onClick={event => {
22
- setAnchorEl(event.currentTarget)
23
- }}
24
- >
25
- <ArrowDown />
26
- </IconButton>
16
+ <Paper style={{ background: '#aaa7' }}>
17
+ <IconButton
18
+ color="secondary"
19
+ onClick={event => setAnchorEl(event.currentTarget)}
20
+ >
21
+ <ArrowDown fontSize="small" />
22
+ </IconButton>
27
23
 
28
- <IconButton
29
- data-testid="zoom_out"
30
- onClick={() => {
31
- model.zoom(bpPerPx * 2)
32
- }}
33
- disabled={bpPerPx >= maxBpPerPx - 0.0001 || scaleFactor !== 1}
34
- color="secondary"
35
- >
36
- <ZoomOut />
37
- </IconButton>
38
- <IconButton
39
- data-testid="zoom_in"
40
- onClick={() => {
41
- model.zoom(model.bpPerPx / 2)
42
- }}
43
- disabled={bpPerPx <= minBpPerPx + 0.0001 || scaleFactor !== 1}
44
- color="secondary"
45
- >
46
- <ZoomIn />
47
- </IconButton>
48
- </Paper>
24
+ <IconButton
25
+ data-testid="zoom_out"
26
+ onClick={() => model.zoom(bpPerPx * 2)}
27
+ disabled={bpPerPx >= maxBpPerPx - 0.0001 || scaleFactor !== 1}
28
+ color="secondary"
29
+ >
30
+ <ZoomOut fontSize="small" />
31
+ </IconButton>
32
+ <IconButton
33
+ data-testid="zoom_in"
34
+ onClick={() => model.zoom(model.bpPerPx / 2)}
35
+ disabled={bpPerPx <= minBpPerPx + 0.0001 || scaleFactor !== 1}
36
+ color="secondary"
37
+ >
38
+ <ZoomIn fontSize="small" />
39
+ </IconButton>
49
40
  <Menu
50
41
  anchorEl={anchorEl}
51
42
  open={Boolean(anchorEl)}
@@ -53,12 +44,10 @@ const MiniControls = observer((props: { model: LinearGenomeViewModel }) => {
53
44
  callback()
54
45
  setAnchorEl(undefined)
55
46
  }}
56
- onClose={() => {
57
- setAnchorEl(undefined)
58
- }}
47
+ onClose={() => setAnchorEl(undefined)}
59
48
  menuItems={model.menuItems()}
60
49
  />
61
- </>
50
+ </Paper>
62
51
  )
63
52
  })
64
53
 
@@ -1,11 +1,6 @@
1
1
  import React, { useRef, useEffect, useState } from 'react'
2
- import {
3
- Popover,
4
- Tooltip,
5
- Typography,
6
- makeStyles,
7
- alpha,
8
- } from '@material-ui/core'
2
+ import { Popover, Tooltip, Typography, alpha } from '@mui/material'
3
+ import { makeStyles } from 'tss-react/mui'
9
4
  import { getSession, stringify } from '@jbrowse/core/util'
10
5
  import { observer, PropTypes as MobxPropTypes } from 'mobx-react'
11
6
  import ReactPropTypes from 'prop-types'
@@ -14,7 +9,8 @@ import { LinearGenomeViewModel, HEADER_OVERVIEW_HEIGHT } from '..'
14
9
 
15
10
  type LGV = LinearGenomeViewModel
16
11
 
17
- const useStyles = makeStyles(theme => {
12
+ const useStyles = makeStyles()(theme => {
13
+ // @ts-ignore
18
14
  const { tertiary, primary } = theme.palette
19
15
  const background = tertiary
20
16
  ? alpha(tertiary.main, 0.7)
@@ -66,7 +62,7 @@ const HoverTooltip = observer(
66
62
  guideX: number
67
63
  overview: Base1DViewModel
68
64
  }) => {
69
- const classes = useStyles()
65
+ const { classes } = useStyles()
70
66
  const { cytobandOffset } = model
71
67
  const { assemblyManager } = getSession(model)
72
68
 
@@ -112,7 +108,7 @@ function OverviewRubberBand({
112
108
  const [guideX, setGuideX] = useState<number>()
113
109
  const controlsRef = useRef<HTMLDivElement>(null)
114
110
  const rubberBandRef = useRef(null)
115
- const classes = useStyles()
111
+ const { classes } = useStyles()
116
112
  const mouseDragging = startX !== undefined
117
113
 
118
114
  useEffect(() => {