react-msaview 4.0.2 → 4.1.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 (170) hide show
  1. package/bundle/index.js +282 -111
  2. package/dist/colorSchemes.js +1 -1
  3. package/dist/colorSchemes.js.map +1 -1
  4. package/dist/components/Checkbox2.js.map +1 -1
  5. package/dist/components/Loading.js +5 -6
  6. package/dist/components/Loading.js.map +1 -1
  7. package/dist/components/MSAView.js +3 -4
  8. package/dist/components/MSAView.js.map +1 -1
  9. package/dist/components/ResizeHandles.js.map +1 -1
  10. package/dist/components/SequenceTextArea.js +1 -2
  11. package/dist/components/SequenceTextArea.js.map +1 -1
  12. package/dist/components/TextTrack.d.ts +1 -1
  13. package/dist/components/TextTrack.js +1 -1
  14. package/dist/components/TextTrack.js.map +1 -1
  15. package/dist/components/Track.js +4 -5
  16. package/dist/components/Track.js.map +1 -1
  17. package/dist/components/VerticalScrollbar.js +1 -1
  18. package/dist/components/VerticalScrollbar.js.map +1 -1
  19. package/dist/components/dialogs/AboutDialog.js +4 -4
  20. package/dist/components/dialogs/AboutDialog.js.map +1 -1
  21. package/dist/components/dialogs/AddTrackDialog.js +1 -1
  22. package/dist/components/dialogs/AddTrackDialog.js.map +1 -1
  23. package/dist/components/dialogs/DomainDialog.js +1 -2
  24. package/dist/components/dialogs/DomainDialog.js.map +1 -1
  25. package/dist/components/dialogs/ExportSVGDialog.js +1 -1
  26. package/dist/components/dialogs/ExportSVGDialog.js.map +1 -1
  27. package/dist/components/dialogs/FeatureDialog.js +1 -1
  28. package/dist/components/dialogs/FeatureDialog.js.map +1 -1
  29. package/dist/components/dialogs/InterProScanDialog.js +3 -3
  30. package/dist/components/dialogs/InterProScanDialog.js.map +1 -1
  31. package/dist/components/dialogs/MetadataDialog.js +3 -2
  32. package/dist/components/dialogs/MetadataDialog.js.map +1 -1
  33. package/dist/components/dialogs/SettingsDialog.js +29 -29
  34. package/dist/components/dialogs/SettingsDialog.js.map +1 -1
  35. package/dist/components/dialogs/TrackInfoDialog.js +2 -2
  36. package/dist/components/dialogs/TrackInfoDialog.js.map +1 -1
  37. package/dist/components/dialogs/TracklistDialog.js +1 -1
  38. package/dist/components/dialogs/TracklistDialog.js.map +1 -1
  39. package/dist/components/dialogs/UserProvidedDomainsDialog.js +3 -3
  40. package/dist/components/dialogs/UserProvidedDomainsDialog.js.map +1 -1
  41. package/dist/components/header/Header.js +5 -7
  42. package/dist/components/header/Header.js.map +1 -1
  43. package/dist/components/header/HeaderInfoArea.js.map +1 -1
  44. package/dist/components/header/HeaderMenu.js +3 -4
  45. package/dist/components/header/HeaderMenu.js.map +1 -1
  46. package/dist/components/header/HeaderMenuExtra.js +8 -9
  47. package/dist/components/header/HeaderMenuExtra.js.map +1 -1
  48. package/dist/components/header/HeaderStatusArea.js +1 -1
  49. package/dist/components/header/HeaderStatusArea.js.map +1 -1
  50. package/dist/components/header/MultiAlignmentSelector.js +1 -1
  51. package/dist/components/header/MultiAlignmentSelector.js.map +1 -1
  52. package/dist/components/header/ZoomControls.js +11 -5
  53. package/dist/components/header/ZoomControls.js.map +1 -1
  54. package/dist/components/import/ImportForm.js +19 -15
  55. package/dist/components/import/ImportForm.js.map +1 -1
  56. package/dist/components/import/ImportFormExamples.js +2 -2
  57. package/dist/components/import/ImportFormExamples.js.map +1 -1
  58. package/dist/components/import/util.d.ts +1 -1
  59. package/dist/components/minimap/Minimap.js.map +1 -1
  60. package/dist/components/minimap/MinimapSVG.js.map +1 -1
  61. package/dist/components/msa/Loading.js +1 -1
  62. package/dist/components/msa/Loading.js.map +1 -1
  63. package/dist/components/msa/MSACanvas.js +2 -2
  64. package/dist/components/msa/MSACanvas.js.map +1 -1
  65. package/dist/components/msa/MSACanvasBlock.js +2 -3
  66. package/dist/components/msa/MSACanvasBlock.js.map +1 -1
  67. package/dist/components/msa/MSAMouseoverCanvas.js +1 -1
  68. package/dist/components/msa/MSAMouseoverCanvas.js.map +1 -1
  69. package/dist/components/msa/MSAPanel.js +0 -1
  70. package/dist/components/msa/MSAPanel.js.map +1 -1
  71. package/dist/components/msa/renderBoxFeatureCanvasBlock.js.map +1 -1
  72. package/dist/components/msa/renderMSABlock.d.ts +1 -1
  73. package/dist/components/msa/renderMSABlock.js +9 -3
  74. package/dist/components/msa/renderMSABlock.js.map +1 -1
  75. package/dist/components/tree/TreeBranchMenu.js.map +1 -1
  76. package/dist/components/tree/TreeCanvas.js +1 -2
  77. package/dist/components/tree/TreeCanvas.js.map +1 -1
  78. package/dist/components/tree/TreeCanvasBlock.js +4 -5
  79. package/dist/components/tree/TreeCanvasBlock.js.map +1 -1
  80. package/dist/components/tree/TreeNodeMenu.js +5 -1
  81. package/dist/components/tree/TreeNodeMenu.js.map +1 -1
  82. package/dist/components/tree/TreePanel.js.map +1 -1
  83. package/dist/components/tree/TreeRuler.js.map +1 -1
  84. package/dist/components/tree/dialogs/TreeNodeInfoDialog.js +2 -1
  85. package/dist/components/tree/dialogs/TreeNodeInfoDialog.js.map +1 -1
  86. package/dist/components/tree/renderTreeCanvas.d.ts +2 -2
  87. package/dist/components/tree/renderTreeCanvas.js +5 -5
  88. package/dist/components/tree/renderTreeCanvas.js.map +1 -1
  89. package/dist/index.d.ts +1 -1
  90. package/dist/index.js.map +1 -1
  91. package/dist/launchInterProScan.js.map +1 -1
  92. package/dist/model/DialogQueue.js.map +1 -1
  93. package/dist/model/treeModel.d.ts +1 -1
  94. package/dist/model/treeModel.js +1 -1
  95. package/dist/model/treeModel.js.map +1 -1
  96. package/dist/model.d.ts +30 -34
  97. package/dist/model.js +71 -40
  98. package/dist/model.js.map +1 -1
  99. package/dist/parsers/ClustalMSA.js.map +1 -1
  100. package/dist/parsers/EmfMSA.js.map +1 -1
  101. package/dist/parsers/StockholmMSA.js.map +1 -1
  102. package/dist/renderToSvg.d.ts +1 -1
  103. package/dist/renderToSvg.js +5 -6
  104. package/dist/renderToSvg.js.map +1 -1
  105. package/dist/rowCoordinateCalculations.test.js.map +1 -1
  106. package/dist/util.d.ts +1 -1
  107. package/dist/util.js +1 -1
  108. package/dist/util.js.map +1 -1
  109. package/dist/version.d.ts +1 -1
  110. package/dist/version.js +1 -1
  111. package/package.json +4 -5
  112. package/src/colorSchemes.ts +2 -1
  113. package/src/components/Checkbox2.tsx +1 -0
  114. package/src/components/Loading.tsx +7 -6
  115. package/src/components/MSAView.tsx +6 -5
  116. package/src/components/ResizeHandles.tsx +1 -1
  117. package/src/components/SequenceTextArea.tsx +2 -2
  118. package/src/components/TextTrack.tsx +5 -3
  119. package/src/components/Track.tsx +5 -5
  120. package/src/components/VerticalScrollbar.tsx +5 -2
  121. package/src/components/dialogs/AboutDialog.tsx +6 -7
  122. package/src/components/dialogs/AddTrackDialog.tsx +7 -5
  123. package/src/components/dialogs/DomainDialog.tsx +3 -2
  124. package/src/components/dialogs/ExportSVGDialog.tsx +7 -5
  125. package/src/components/dialogs/FeatureDialog.tsx +4 -3
  126. package/src/components/dialogs/InterProScanDialog.tsx +6 -5
  127. package/src/components/dialogs/MetadataDialog.tsx +6 -7
  128. package/src/components/dialogs/SettingsDialog.tsx +24 -22
  129. package/src/components/dialogs/TrackInfoDialog.tsx +3 -2
  130. package/src/components/dialogs/TracklistDialog.tsx +4 -4
  131. package/src/components/dialogs/UserProvidedDomainsDialog.tsx +7 -6
  132. package/src/components/header/Header.tsx +8 -11
  133. package/src/components/header/HeaderInfoArea.tsx +1 -1
  134. package/src/components/header/HeaderMenu.tsx +4 -6
  135. package/src/components/header/HeaderMenuExtra.tsx +9 -11
  136. package/src/components/header/HeaderStatusArea.tsx +2 -2
  137. package/src/components/header/MultiAlignmentSelector.tsx +2 -2
  138. package/src/components/header/ZoomControls.tsx +13 -6
  139. package/src/components/import/ImportForm.tsx +31 -24
  140. package/src/components/import/ImportFormExamples.tsx +5 -4
  141. package/src/components/import/util.ts +1 -1
  142. package/src/components/minimap/Minimap.tsx +2 -0
  143. package/src/components/minimap/MinimapSVG.tsx +2 -0
  144. package/src/components/msa/Loading.tsx +2 -1
  145. package/src/components/msa/MSACanvas.tsx +5 -4
  146. package/src/components/msa/MSACanvasBlock.tsx +5 -4
  147. package/src/components/msa/MSAMouseoverCanvas.tsx +4 -3
  148. package/src/components/msa/MSAPanel.tsx +2 -1
  149. package/src/components/msa/renderBoxFeatureCanvasBlock.ts +1 -3
  150. package/src/components/msa/renderMSABlock.ts +11 -10
  151. package/src/components/tree/TreeBranchMenu.tsx +1 -1
  152. package/src/components/tree/TreeCanvas.tsx +4 -4
  153. package/src/components/tree/TreeCanvasBlock.tsx +7 -7
  154. package/src/components/tree/TreeNodeMenu.tsx +10 -1
  155. package/src/components/tree/TreePanel.tsx +3 -1
  156. package/src/components/tree/TreeRuler.tsx +1 -1
  157. package/src/components/tree/dialogs/TreeNodeInfoDialog.tsx +5 -6
  158. package/src/components/tree/renderTreeCanvas.ts +7 -9
  159. package/src/index.ts +1 -1
  160. package/src/launchInterProScan.ts +2 -0
  161. package/src/model/DialogQueue.ts +2 -1
  162. package/src/model/treeModel.ts +1 -1
  163. package/src/model.ts +89 -58
  164. package/src/parsers/ClustalMSA.ts +1 -0
  165. package/src/parsers/EmfMSA.ts +1 -0
  166. package/src/parsers/StockholmMSA.ts +1 -1
  167. package/src/renderToSvg.tsx +7 -9
  168. package/src/rowCoordinateCalculations.test.ts +1 -0
  169. package/src/util.ts +4 -3
  170. package/src/version.ts +1 -1
@@ -1,13 +1,14 @@
1
1
  import React, { useState } from 'react'
2
+
3
+ import { ErrorMessage, FileSelector } from '@jbrowse/core/ui'
4
+ import { Button, Container, Typography } from '@mui/material'
2
5
  import { observer } from 'mobx-react'
3
- import { Button, Container, Grid, Typography } from '@mui/material'
4
- import { FileSelector } from '@jbrowse/core/ui'
5
- import type { FileLocation } from '@jbrowse/core/util/types'
6
6
 
7
- // locals
8
- import type { MsaViewModel } from '../../model'
9
- import { load } from './util'
10
7
  import ImportFormExamples from './ImportFormExamples'
8
+ import { load } from './util'
9
+
10
+ import type { MsaViewModel } from '../../model'
11
+ import type { FileLocation } from '@jbrowse/core/util/types'
11
12
 
12
13
  const ImportForm = observer(function ({ model }: { model: MsaViewModel }) {
13
14
  const [msaFile, setMsaFile] = useState<FileLocation>()
@@ -17,11 +18,7 @@ const ImportForm = observer(function ({ model }: { model: MsaViewModel }) {
17
18
  return (
18
19
  <Container>
19
20
  <div style={{ width: '50%' }}>
20
- {error ? (
21
- <div style={{ padding: 20 }}>
22
- <Typography color="error">Error: {`${error}`}</Typography>
23
- </div>
24
- ) : null}
21
+ {error ? <ErrorMessage error={error} /> : null}
25
22
  <Typography>
26
23
  Open an MSA file (stockholm or clustal format) and/or a tree file
27
24
  (newick format).
@@ -34,15 +31,25 @@ const ImportForm = observer(function ({ model }: { model: MsaViewModel }) {
34
31
  </Typography>
35
32
  </div>
36
33
 
37
- <Grid container spacing={10} justifyContent="center" alignItems="center">
38
- <Grid item>
39
- <Typography>MSA file or URL</Typography>
40
- <FileSelector location={msaFile} setLocation={setMsaFile} />
41
- <Typography>Tree file or URL</Typography>
42
- <FileSelector location={treeFile} setLocation={setTreeFile} />
43
- </Grid>
44
-
45
- <Grid item>
34
+ <div
35
+ style={{
36
+ display: 'flex',
37
+ justifyContent: 'center',
38
+ alignItems: 'center',
39
+ gap: 40,
40
+ }}
41
+ >
42
+ <div>
43
+ <div>
44
+ <Typography>MSA file or URL</Typography>
45
+ <FileSelector location={msaFile} setLocation={setMsaFile} />
46
+ </div>
47
+ <div>
48
+ <Typography>Tree file or URL</Typography>
49
+ <FileSelector location={treeFile} setLocation={setTreeFile} />
50
+ </div>
51
+ </div>
52
+ <div>
46
53
  <Button
47
54
  onClick={() => {
48
55
  // eslint-disable-next-line @typescript-eslint/no-floating-promises
@@ -61,13 +68,13 @@ const ImportForm = observer(function ({ model }: { model: MsaViewModel }) {
61
68
  >
62
69
  Open
63
70
  </Button>
64
- </Grid>
71
+ </div>
65
72
 
66
- <Grid item>
73
+ <div>
67
74
  <Typography>Examples</Typography>
68
75
  <ImportFormExamples model={model} />
69
- </Grid>
70
- </Grid>
76
+ </div>
77
+ </div>
71
78
  </Container>
72
79
  )
73
80
  })
@@ -1,12 +1,13 @@
1
1
  import React from 'react'
2
- import { Typography, Link } from '@mui/material'
2
+
3
+ import { Link, Typography } from '@mui/material'
3
4
  import { observer } from 'mobx-react'
4
5
 
5
- // locals
6
- import type { MsaViewModel } from '../../model'
7
- import { smallTree, smallMSA, smallMSAOnly } from './data/seq2'
6
+ import { smallMSA, smallMSAOnly, smallTree } from './data/seq2'
8
7
  import { load } from './util'
9
8
 
9
+ import type { MsaViewModel } from '../../model'
10
+
10
11
  function ListItem({
11
12
  onClick,
12
13
  model,
@@ -1,5 +1,5 @@
1
- import type { FileLocation } from '@jbrowse/core/util'
2
1
  import type { MsaViewModel } from '../../model'
2
+ import type { FileLocation } from '@jbrowse/core/util'
3
3
 
4
4
  export async function load(
5
5
  model: MsaViewModel,
@@ -1,5 +1,7 @@
1
1
  import React, { useEffect, useRef, useState } from 'react'
2
+
2
3
  import { observer } from 'mobx-react'
4
+
3
5
  import type { MsaViewModel } from '../../model'
4
6
 
5
7
  interface ClickCoord {
@@ -1,5 +1,7 @@
1
1
  import React from 'react'
2
+
2
3
  import { observer } from 'mobx-react'
4
+
3
5
  import type { MsaViewModel } from '../../model'
4
6
 
5
7
  const MinimapSVG = observer(({ model }: { model: MsaViewModel }) => {
@@ -1,5 +1,6 @@
1
- import { CircularProgress, Typography } from '@mui/material'
2
1
  import React from 'react'
2
+
3
+ import { CircularProgress, Typography } from '@mui/material'
3
4
  export default function Loading() {
4
5
  return (
5
6
  <div
@@ -1,10 +1,11 @@
1
- import React, { useEffect, useState, useRef } from 'react'
1
+ import React, { useEffect, useRef, useState } from 'react'
2
+
2
3
  import { observer } from 'mobx-react'
3
4
 
4
- // locals
5
- import type { MsaViewModel } from '../../model'
6
- import MSACanvasBlock from './MSACanvasBlock'
7
5
  import Loading from './Loading'
6
+ import MSACanvasBlock from './MSACanvasBlock'
7
+
8
+ import type { MsaViewModel } from '../../model'
8
9
 
9
10
  const MSACanvas = observer(function ({ model }: { model: MsaViewModel }) {
10
11
  const {
@@ -1,13 +1,14 @@
1
- import React, { useEffect, useRef, useMemo } from 'react'
1
+ import React, { useEffect, useMemo, useRef } from 'react'
2
+
2
3
  import { useTheme } from '@mui/material'
3
4
  import { autorun } from 'mobx'
4
5
  import { observer } from 'mobx-react'
5
6
 
6
- // locals
7
+ import { renderBoxFeatureCanvasBlock } from './renderBoxFeatureCanvasBlock'
7
8
  import { renderMSABlock } from './renderMSABlock'
8
- import type { MsaViewModel } from '../../model'
9
9
  import { colorContrast } from '../../util'
10
- import { renderBoxFeatureCanvasBlock } from './renderBoxFeatureCanvasBlock'
10
+
11
+ import type { MsaViewModel } from '../../model'
11
12
 
12
13
  const MSACanvasBlock = observer(function ({
13
14
  model,
@@ -1,11 +1,12 @@
1
1
  import React, { useEffect, useRef } from 'react'
2
- import { observer } from 'mobx-react'
2
+
3
3
  import { autorun } from 'mobx'
4
+ import { observer } from 'mobx-react'
4
5
 
5
- // locals
6
- import type { MsaViewModel } from '../../model'
7
6
  import { renderMouseover } from './renderMSAMouseover'
8
7
 
8
+ import type { MsaViewModel } from '../../model'
9
+
9
10
  const MSAMouseoverCanvas = observer(function ({
10
11
  model,
11
12
  }: {
@@ -1,9 +1,10 @@
1
1
  import React from 'react'
2
+
2
3
  import { observer } from 'mobx-react'
3
4
 
4
- // locals
5
5
  import MSACanvas from './MSACanvas'
6
6
  import MSAMouseoverCanvas from './MSAMouseoverCanvas'
7
+
7
8
  // types
8
9
  import type { MsaViewModel } from '../../model'
9
10
 
@@ -1,8 +1,6 @@
1
- import type { HierarchyNode } from 'd3-hierarchy'
2
-
3
- // locals
4
1
  import type { MsaViewModel } from '../../model'
5
2
  import type { NodeWithIdsAndLength } from '../../util'
3
+ import type { HierarchyNode } from 'd3-hierarchy'
6
4
 
7
5
  export function renderBoxFeatureCanvasBlock({
8
6
  model,
@@ -1,10 +1,9 @@
1
- import type { HierarchyNode } from 'd3-hierarchy'
2
- import type { Theme } from '@mui/material'
1
+ import { getClustalXColor, getPercentIdentityColor } from '../../colorSchemes'
3
2
 
4
- // locals
5
3
  import type { MsaViewModel } from '../../model'
6
- import { getClustalXColor, getPercentIdentityColor } from '../../colorSchemes'
7
4
  import type { NodeWithIdsAndLength } from '../../util'
5
+ import type { Theme } from '@mui/material'
6
+ import type { HierarchyNode } from 'd3-hierarchy'
8
7
 
9
8
  export function renderMSABlock({
10
9
  model,
@@ -98,8 +97,6 @@ function drawTiles({
98
97
  bgColor,
99
98
  colorSchemeName,
100
99
  colorScheme,
101
- colStats,
102
- colStatsSums,
103
100
  columns,
104
101
  colWidth,
105
102
  rowHeight,
@@ -117,16 +114,20 @@ function drawTiles({
117
114
  const color =
118
115
  colorSchemeName === 'clustalx_protein_dynamic'
119
116
  ? getClustalXColor(
120
- colStats[xStart + i]!,
121
- colStatsSums[xStart + i]!,
117
+ // use model.colStats dot notation here: delay use of colStats
118
+ // until absolutely needed
119
+ model.colStats[xStart + i]!,
120
+ model.colStatsSums[xStart + i]!,
122
121
  model,
123
122
  name,
124
123
  xStart + i,
125
124
  )
126
125
  : colorSchemeName === 'percent_identity_dynamic'
127
126
  ? getPercentIdentityColor(
128
- colStats[xStart + i]!,
129
- colStatsSums[xStart + i]!,
127
+ // use model.colStats dot notation here: delay use of
128
+ // colStats until absolutely needed
129
+ model.colStats[xStart + i]!,
130
+ model.colStatsSums[xStart + i]!,
130
131
  model,
131
132
  name,
132
133
  xStart + i,
@@ -1,8 +1,8 @@
1
1
  import React from 'react'
2
+
2
3
  import { Menu, MenuItem } from '@mui/material'
3
4
  import { observer } from 'mobx-react'
4
5
 
5
- // locals
6
6
  import type { MsaViewModel } from '../../model'
7
7
 
8
8
  interface Node {
@@ -1,12 +1,12 @@
1
- import React from 'react'
2
- import { useEffect, useRef, useState } from 'react'
1
+ import React, { useEffect, useRef, useState } from 'react'
2
+
3
3
  import { observer } from 'mobx-react'
4
4
 
5
- // locals
6
- import type { MsaViewModel } from '../../model'
7
5
  import TreeCanvasBlock from './TreeCanvasBlock'
8
6
  import { padding } from './renderTreeCanvas'
9
7
 
8
+ import type { MsaViewModel } from '../../model'
9
+
10
10
  const TreeCanvas = observer(function ({ model }: { model: MsaViewModel }) {
11
11
  const ref = useRef<HTMLDivElement>(null)
12
12
  const scheduled = useRef(false)
@@ -1,16 +1,16 @@
1
- import React from 'react'
2
- import { useCallback, useEffect, useRef, useState } from 'react'
1
+ import React, { useCallback, useEffect, useRef, useState } from 'react'
2
+
3
+ import { useTheme } from '@mui/material'
3
4
  import { autorun } from 'mobx'
4
5
  import { observer } from 'mobx-react'
5
- import { useTheme } from '@mui/material'
6
6
  import RBush from 'rbush'
7
7
 
8
- // locals
9
- import type { MsaViewModel } from '../../model'
10
- import TreeNodeMenu from './TreeNodeMenu'
11
8
  import TreeBranchMenu from './TreeBranchMenu'
9
+ import TreeNodeMenu from './TreeNodeMenu'
12
10
  import { padding, renderTreeCanvas } from './renderTreeCanvas'
13
11
 
12
+ import type { MsaViewModel } from '../../model'
13
+
14
14
  interface TooltipData {
15
15
  name: string
16
16
  id: string
@@ -36,7 +36,7 @@ const TreeCanvasBlock = observer(function ({
36
36
  offsetY: number
37
37
  }) {
38
38
  const theme = useTheme()
39
- const ref = useRef<HTMLCanvasElement>()
39
+ const ref = useRef<HTMLCanvasElement>(null)
40
40
  const clickMap = useRef(new RBush<ClickEntry>())
41
41
  const mouseoverRef = useRef<HTMLCanvasElement>(null)
42
42
  const [branchMenu, setBranchMenu] = useState<TooltipData>()
@@ -1,8 +1,8 @@
1
1
  import React, { lazy } from 'react'
2
+
2
3
  import { Menu, MenuItem } from '@mui/material'
3
4
  import { observer } from 'mobx-react'
4
5
 
5
- // locals
6
6
  import type { MsaViewModel } from '../../model'
7
7
 
8
8
  // lazies
@@ -76,6 +76,15 @@ const TreeMenu = observer(function ({
76
76
  ? 'Show node'
77
77
  : 'Hide node'}
78
78
  </MenuItem>
79
+ <MenuItem
80
+ dense
81
+ onClick={() => {
82
+ model.drawRelativeTo(node.id)
83
+ onClose()
84
+ }}
85
+ >
86
+ Indicate differences from this row
87
+ </MenuItem>
79
88
  </Menu>
80
89
  )
81
90
  })
@@ -1,9 +1,11 @@
1
1
  import React from 'react'
2
+
2
3
  import { observer } from 'mobx-react'
3
4
 
4
- import type { MsaViewModel } from '../../model'
5
5
  import TreeCanvas from './TreeCanvas'
6
6
 
7
+ import type { MsaViewModel } from '../../model'
8
+
7
9
  const TreePanel = observer(function ({ model }: { model: MsaViewModel }) {
8
10
  const { treeAreaWidth } = model
9
11
  return (
@@ -1,7 +1,7 @@
1
1
  import React from 'react'
2
+
2
3
  import { observer } from 'mobx-react'
3
4
 
4
- // locals
5
5
  import type { MsaViewModel } from '../../model'
6
6
 
7
7
  const TreeRuler = observer(({ model }: { model: MsaViewModel }) => {
@@ -1,16 +1,15 @@
1
1
  import React from 'react'
2
+
3
+ import Attributes from '@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail/Attributes'
4
+ import BaseCard from '@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail/BaseCard'
2
5
  import { Dialog } from '@jbrowse/core/ui'
3
6
  import { DialogContent } from '@mui/material'
4
7
  import { observer } from 'mobx-react'
5
- import {
6
- Attributes,
7
- BaseCard,
8
- } from '@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail'
9
8
 
10
- // locals
11
- import type { MsaViewModel } from '../../../model'
12
9
  import SequenceTextArea from '../../SequenceTextArea'
13
10
 
11
+ import type { MsaViewModel } from '../../../model'
12
+
14
13
  const TreeNodeInfoDialog = observer(function ({
15
14
  info,
16
15
  model,
@@ -1,8 +1,6 @@
1
- import type RBush from 'rbush'
2
- import type { Theme } from '@mui/material'
3
-
4
- // locals
5
1
  import type { MsaViewModel } from '../../model'
2
+ import type { Theme } from '@mui/material'
3
+ import type RBush from 'rbush'
6
4
 
7
5
  export const padding = 600
8
6
 
@@ -255,11 +253,11 @@ export function renderTreeCanvas({
255
253
 
256
254
  ctx.resetTransform()
257
255
 
258
- // this is a bogus use of nref, it is never less than 0. we just are using it
259
- // in this statement because otherwise it would be an unused variable, we
260
- // just need to use nref to indicate a redraw in an autorun when canvas ref
261
- // is updated and in order to convince bundlers like not to delete unused
262
- // usage with propertyReadSideEffects
256
+ // this is a bogus use of nref, it is never less than 0. we just are using
257
+ // it in this statement because otherwise it would be an unused variable,
258
+ // we just need to use nref to indicate a redraw in an autorun when canvas
259
+ // ref is updated and in order to convince bundlers like not to delete
260
+ // unused usage with propertyReadSideEffects
263
261
  const k =
264
262
  nref < 0
265
263
  ? Number.NEGATIVE_INFINITY
package/src/index.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  export { default as MSAView } from './components/Loading'
2
- export { default as MSAModelF, type MsaViewModel } from './model'
2
+ export { type MsaViewModel, default as MSAModelF } from './model'
@@ -1,5 +1,7 @@
1
1
  import { getSession } from '@jbrowse/core/util'
2
+
2
3
  import { jsonfetch, textfetch, timeout } from './fetchUtils'
4
+
3
5
  import type { MsaViewModel } from './model'
4
6
 
5
7
  const base = 'https://www.ebi.ac.uk/Tools/services/rest'
@@ -1,6 +1,7 @@
1
- import type { DialogComponentType } from '@jbrowse/core/util'
2
1
  import { types } from 'mobx-state-tree'
3
2
 
3
+ import type { DialogComponentType } from '@jbrowse/core/util'
4
+
4
5
  /**
5
6
  * #stateModel DialogQueueSessionMixin
6
7
  */
@@ -5,7 +5,7 @@ import { types } from 'mobx-state-tree'
5
5
  */
6
6
  function x() {} // eslint-disable-line @typescript-eslint/no-unused-vars
7
7
 
8
- export function TreeF() {
8
+ export function TreeModelF() {
9
9
  return types
10
10
  .model({
11
11
  /**