@jbrowse/plugin-linear-genome-view 2.2.1 → 2.3.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.
- package/dist/BaseLinearDisplay/components/BaseLinearDisplay.d.ts +2 -1
- package/dist/BaseLinearDisplay/components/BaseLinearDisplay.js +4 -2
- package/dist/BaseLinearDisplay/components/BaseLinearDisplay.js.map +1 -1
- package/dist/BaseLinearDisplay/components/Block.d.ts +1 -1
- package/dist/BaseLinearDisplay/components/Block.js +1 -1
- package/dist/BaseLinearDisplay/components/Block.js.map +1 -1
- package/dist/BaseLinearDisplay/components/BlockMsg.js +3 -2
- package/dist/BaseLinearDisplay/components/BlockMsg.js.map +1 -1
- package/dist/BaseLinearDisplay/components/LinearBlocks.d.ts +1 -1
- package/dist/BaseLinearDisplay/components/LinearBlocks.js +2 -2
- package/dist/BaseLinearDisplay/components/LinearBlocks.js.map +1 -1
- package/dist/BaseLinearDisplay/{models → components}/TooLargeMessage.d.ts +0 -0
- package/dist/BaseLinearDisplay/{models → components}/TooLargeMessage.js +0 -0
- package/dist/BaseLinearDisplay/components/TooLargeMessage.js.map +1 -0
- package/dist/BaseLinearDisplay/index.d.ts +2 -2
- package/dist/BaseLinearDisplay/index.js +4 -3
- package/dist/BaseLinearDisplay/index.js.map +1 -1
- package/dist/BaseLinearDisplay/models/BaseLinearDisplayModel.d.ts +6 -14
- package/dist/BaseLinearDisplay/models/BaseLinearDisplayModel.js +3 -5
- package/dist/BaseLinearDisplay/models/BaseLinearDisplayModel.js.map +1 -1
- package/dist/BaseLinearDisplay/models/configSchema.d.ts +2 -0
- package/dist/BaseLinearDisplay/models/{baseLinearDisplayConfigSchema.js → configSchema.js} +5 -5
- package/dist/BaseLinearDisplay/models/configSchema.js.map +1 -0
- package/dist/BaseLinearDisplay/models/serverSideRenderedBlock.js +1 -1
- package/dist/BaseLinearDisplay/models/serverSideRenderedBlock.js.map +1 -1
- package/dist/BaseLinearDisplay/models/util.d.ts +18 -0
- package/dist/BaseLinearDisplay/models/util.js +18 -0
- package/dist/BaseLinearDisplay/models/util.js.map +1 -0
- package/dist/FeatureTrack/index.d.ts +1 -1
- package/dist/FeatureTrack/index.js +5 -4
- package/dist/FeatureTrack/index.js.map +1 -1
- package/dist/LaunchLinearGenomeView/index.d.ts +3 -0
- package/dist/LaunchLinearGenomeView/index.js +44 -0
- package/dist/LaunchLinearGenomeView/index.js.map +1 -0
- package/dist/LinearBareDisplay/index.d.ts +6 -2
- package/dist/LinearBareDisplay/index.js +18 -2
- package/dist/LinearBareDisplay/index.js.map +1 -1
- package/dist/LinearBareDisplay/model.d.ts +1 -1
- package/dist/LinearBasicDisplay/components/SetMaxHeight.js +2 -15
- package/dist/LinearBasicDisplay/components/SetMaxHeight.js.map +1 -1
- package/dist/LinearBasicDisplay/index.d.ts +6 -2
- package/dist/LinearBasicDisplay/index.js +21 -4
- package/dist/LinearBasicDisplay/index.js.map +1 -1
- package/dist/LinearBasicDisplay/model.d.ts +17 -13
- package/dist/LinearBasicDisplay/model.js +2 -1
- package/dist/LinearBasicDisplay/model.js.map +1 -1
- package/dist/LinearGenomeView/components/ExportSvgDialog.js +1 -19
- package/dist/LinearGenomeView/components/ExportSvgDialog.js.map +1 -1
- package/dist/LinearGenomeView/components/GetSequenceDialog.js +7 -18
- package/dist/LinearGenomeView/components/GetSequenceDialog.js.map +1 -1
- package/dist/LinearGenomeView/components/Header.js +2 -2
- package/dist/LinearGenomeView/components/HelpDialog.js +2 -17
- package/dist/LinearGenomeView/components/HelpDialog.js.map +1 -1
- package/dist/LinearGenomeView/components/ImportForm.js +15 -10
- package/dist/LinearGenomeView/components/ImportForm.js.map +1 -1
- package/dist/LinearGenomeView/components/LinearGenomeViewSvg.js +6 -7
- package/dist/LinearGenomeView/components/LinearGenomeViewSvg.js.map +1 -1
- package/{esm/LinearGenomeView/components/OverviewRubberBand.d.ts → dist/LinearGenomeView/components/OverviewRubberband.d.ts} +2 -2
- package/dist/LinearGenomeView/components/{OverviewRubberBand.js → OverviewRubberband.js} +27 -79
- package/dist/LinearGenomeView/components/OverviewRubberband.js.map +1 -0
- package/dist/LinearGenomeView/components/{OverviewScaleBar.d.ts → OverviewScalebar.d.ts} +2 -2
- package/dist/LinearGenomeView/components/{OverviewScaleBar.js → OverviewScalebar.js} +25 -24
- package/dist/LinearGenomeView/components/OverviewScalebar.js.map +1 -0
- package/dist/LinearGenomeView/components/RefNameAutocomplete.js +1 -1
- package/dist/LinearGenomeView/components/RefNameAutocomplete.js.map +1 -1
- package/dist/LinearGenomeView/components/{RubberBand.d.ts → Rubberband.d.ts} +2 -2
- package/dist/LinearGenomeView/components/Rubberband.js +57 -0
- package/dist/LinearGenomeView/components/Rubberband.js.map +1 -0
- package/dist/LinearGenomeView/components/RubberbandSpan.d.ts +14 -0
- package/dist/LinearGenomeView/components/RubberbandSpan.js +90 -0
- package/dist/LinearGenomeView/components/RubberbandSpan.js.map +1 -0
- package/dist/LinearGenomeView/components/Ruler.d.ts +2 -18
- package/dist/LinearGenomeView/components/Ruler.js +9 -25
- package/dist/LinearGenomeView/components/Ruler.js.map +1 -1
- package/dist/LinearGenomeView/components/{ScaleBar.d.ts → Scalebar.d.ts} +2 -2
- package/dist/LinearGenomeView/components/{ScaleBar.js → Scalebar.js} +11 -11
- package/dist/LinearGenomeView/components/{ScaleBar.js.map → Scalebar.js.map} +1 -1
- package/dist/LinearGenomeView/components/SearchBox.js +10 -6
- package/dist/LinearGenomeView/components/SearchBox.js.map +1 -1
- package/dist/LinearGenomeView/components/SearchResultsDialog.js +17 -31
- package/dist/LinearGenomeView/components/SearchResultsDialog.js.map +1 -1
- package/dist/LinearGenomeView/components/SequenceSearchDialog.js +4 -19
- package/dist/LinearGenomeView/components/SequenceSearchDialog.js.map +1 -1
- package/dist/LinearGenomeView/components/TrackContainer.js +2 -2
- package/dist/LinearGenomeView/components/TrackContainer.js.map +1 -1
- package/dist/LinearGenomeView/components/TracksContainer.js +21 -118
- package/dist/LinearGenomeView/components/TracksContainer.js.map +1 -1
- package/dist/LinearGenomeView/components/VerticalGuide.d.ts +9 -0
- package/dist/LinearGenomeView/components/VerticalGuide.js +29 -0
- package/dist/LinearGenomeView/components/VerticalGuide.js.map +1 -0
- package/dist/LinearGenomeView/components/hooks.d.ts +65 -0
- package/dist/LinearGenomeView/components/hooks.js +264 -0
- package/dist/LinearGenomeView/components/hooks.js.map +1 -0
- package/dist/LinearGenomeView/components/util.d.ts +5 -2
- package/dist/LinearGenomeView/components/util.js +7 -6
- package/dist/LinearGenomeView/components/util.js.map +1 -1
- package/dist/LinearGenomeView/index.d.ts +3 -534
- package/dist/LinearGenomeView/index.js +12 -1327
- package/dist/LinearGenomeView/index.js.map +1 -1
- package/dist/LinearGenomeView/model.d.ts +535 -0
- package/dist/LinearGenomeView/model.js +1357 -0
- package/dist/LinearGenomeView/model.js.map +1 -0
- package/dist/index.d.ts +6 -6
- package/dist/index.js +12 -73
- package/dist/index.js.map +1 -1
- package/esm/BaseLinearDisplay/components/BaseLinearDisplay.d.ts +2 -1
- package/esm/BaseLinearDisplay/components/BaseLinearDisplay.js +3 -2
- package/esm/BaseLinearDisplay/components/BaseLinearDisplay.js.map +1 -1
- package/esm/BaseLinearDisplay/components/Block.d.ts +1 -1
- package/esm/BaseLinearDisplay/components/Block.js +1 -1
- package/esm/BaseLinearDisplay/components/Block.js.map +1 -1
- package/esm/BaseLinearDisplay/components/BlockMsg.js +3 -2
- package/esm/BaseLinearDisplay/components/BlockMsg.js.map +1 -1
- package/esm/BaseLinearDisplay/components/LinearBlocks.d.ts +1 -1
- package/esm/BaseLinearDisplay/components/LinearBlocks.js +2 -2
- package/esm/BaseLinearDisplay/components/LinearBlocks.js.map +1 -1
- package/esm/BaseLinearDisplay/{models → components}/TooLargeMessage.d.ts +0 -0
- package/esm/BaseLinearDisplay/{models → components}/TooLargeMessage.js +0 -0
- package/esm/BaseLinearDisplay/components/TooLargeMessage.js.map +1 -0
- package/esm/BaseLinearDisplay/index.d.ts +2 -2
- package/esm/BaseLinearDisplay/index.js +2 -2
- package/esm/BaseLinearDisplay/index.js.map +1 -1
- package/esm/BaseLinearDisplay/models/BaseLinearDisplayModel.d.ts +6 -14
- package/esm/BaseLinearDisplay/models/BaseLinearDisplayModel.js +3 -5
- package/esm/BaseLinearDisplay/models/BaseLinearDisplayModel.js.map +1 -1
- package/esm/BaseLinearDisplay/models/configSchema.d.ts +2 -0
- package/esm/BaseLinearDisplay/models/{baseLinearDisplayConfigSchema.js → configSchema.js} +5 -4
- package/esm/BaseLinearDisplay/models/configSchema.js.map +1 -0
- package/esm/BaseLinearDisplay/models/serverSideRenderedBlock.js +1 -1
- package/esm/BaseLinearDisplay/models/serverSideRenderedBlock.js.map +1 -1
- package/esm/BaseLinearDisplay/models/util.d.ts +18 -0
- package/esm/BaseLinearDisplay/models/util.js +14 -0
- package/esm/BaseLinearDisplay/models/util.js.map +1 -0
- package/esm/FeatureTrack/index.d.ts +1 -1
- package/esm/FeatureTrack/index.js +5 -4
- package/esm/FeatureTrack/index.js.map +1 -1
- package/esm/LaunchLinearGenomeView/index.d.ts +3 -0
- package/esm/LaunchLinearGenomeView/index.js +42 -0
- package/esm/LaunchLinearGenomeView/index.js.map +1 -0
- package/esm/LinearBareDisplay/index.d.ts +6 -2
- package/esm/LinearBareDisplay/index.js +19 -2
- package/esm/LinearBareDisplay/index.js.map +1 -1
- package/esm/LinearBareDisplay/model.d.ts +1 -1
- package/esm/LinearBasicDisplay/components/SetMaxHeight.js +3 -13
- package/esm/LinearBasicDisplay/components/SetMaxHeight.js.map +1 -1
- package/esm/LinearBasicDisplay/index.d.ts +6 -2
- package/esm/LinearBasicDisplay/index.js +20 -2
- package/esm/LinearBasicDisplay/index.js.map +1 -1
- package/esm/LinearBasicDisplay/model.d.ts +17 -13
- package/esm/LinearBasicDisplay/model.js +2 -1
- package/esm/LinearBasicDisplay/model.js.map +1 -1
- package/esm/LinearGenomeView/components/ExportSvgDialog.js +3 -18
- package/esm/LinearGenomeView/components/ExportSvgDialog.js.map +1 -1
- package/esm/LinearGenomeView/components/GetSequenceDialog.js +8 -19
- package/esm/LinearGenomeView/components/GetSequenceDialog.js.map +1 -1
- package/esm/LinearGenomeView/components/Header.js +2 -2
- package/esm/LinearGenomeView/components/HelpDialog.js +3 -18
- package/esm/LinearGenomeView/components/HelpDialog.js.map +1 -1
- package/esm/LinearGenomeView/components/ImportForm.js +15 -10
- package/esm/LinearGenomeView/components/ImportForm.js.map +1 -1
- package/esm/LinearGenomeView/components/LinearGenomeViewSvg.js +4 -5
- package/esm/LinearGenomeView/components/LinearGenomeViewSvg.js.map +1 -1
- package/{dist/LinearGenomeView/components/OverviewRubberBand.d.ts → esm/LinearGenomeView/components/OverviewRubberband.d.ts} +2 -2
- package/esm/LinearGenomeView/components/{OverviewRubberBand.js → OverviewRubberband.js} +25 -80
- package/esm/LinearGenomeView/components/OverviewRubberband.js.map +1 -0
- package/esm/LinearGenomeView/components/{OverviewScaleBar.d.ts → OverviewScalebar.d.ts} +2 -2
- package/esm/LinearGenomeView/components/{OverviewScaleBar.js → OverviewScalebar.js} +25 -24
- package/esm/LinearGenomeView/components/OverviewScalebar.js.map +1 -0
- package/esm/LinearGenomeView/components/RefNameAutocomplete.js +1 -1
- package/esm/LinearGenomeView/components/RefNameAutocomplete.js.map +1 -1
- package/esm/LinearGenomeView/components/{RubberBand.d.ts → Rubberband.d.ts} +2 -2
- package/esm/LinearGenomeView/components/Rubberband.js +29 -0
- package/esm/LinearGenomeView/components/Rubberband.js.map +1 -0
- package/esm/LinearGenomeView/components/RubberbandSpan.d.ts +14 -0
- package/esm/LinearGenomeView/components/RubberbandSpan.js +65 -0
- package/esm/LinearGenomeView/components/RubberbandSpan.js.map +1 -0
- package/esm/LinearGenomeView/components/Ruler.d.ts +2 -18
- package/esm/LinearGenomeView/components/Ruler.js +6 -22
- package/esm/LinearGenomeView/components/Ruler.js.map +1 -1
- package/esm/LinearGenomeView/components/{ScaleBar.d.ts → Scalebar.d.ts} +2 -2
- package/esm/LinearGenomeView/components/{ScaleBar.js → Scalebar.js} +11 -11
- package/esm/LinearGenomeView/components/{ScaleBar.js.map → Scalebar.js.map} +1 -1
- package/esm/LinearGenomeView/components/SearchBox.js +10 -6
- package/esm/LinearGenomeView/components/SearchBox.js.map +1 -1
- package/esm/LinearGenomeView/components/SearchResultsDialog.js +18 -32
- package/esm/LinearGenomeView/components/SearchResultsDialog.js.map +1 -1
- package/esm/LinearGenomeView/components/SequenceSearchDialog.js +5 -17
- package/esm/LinearGenomeView/components/SequenceSearchDialog.js.map +1 -1
- package/esm/LinearGenomeView/components/TrackContainer.js +2 -2
- package/esm/LinearGenomeView/components/TrackContainer.js.map +1 -1
- package/esm/LinearGenomeView/components/TracksContainer.js +22 -119
- package/esm/LinearGenomeView/components/TracksContainer.js.map +1 -1
- package/esm/LinearGenomeView/components/VerticalGuide.d.ts +9 -0
- package/esm/LinearGenomeView/components/VerticalGuide.js +24 -0
- package/esm/LinearGenomeView/components/VerticalGuide.js.map +1 -0
- package/esm/LinearGenomeView/components/hooks.d.ts +65 -0
- package/esm/LinearGenomeView/components/hooks.js +255 -0
- package/esm/LinearGenomeView/components/hooks.js.map +1 -0
- package/esm/LinearGenomeView/components/util.d.ts +5 -2
- package/esm/LinearGenomeView/components/util.js +4 -3
- package/esm/LinearGenomeView/components/util.js.map +1 -1
- package/esm/LinearGenomeView/index.d.ts +3 -534
- package/esm/LinearGenomeView/index.js +10 -1318
- package/esm/LinearGenomeView/index.js.map +1 -1
- package/esm/LinearGenomeView/model.d.ts +535 -0
- package/esm/LinearGenomeView/model.js +1322 -0
- package/esm/LinearGenomeView/model.js.map +1 -0
- package/esm/index.d.ts +6 -6
- package/esm/index.js +12 -74
- package/esm/index.js.map +1 -1
- package/package.json +5 -6
- package/src/BaseLinearDisplay/components/BaseLinearDisplay.tsx +86 -84
- package/src/BaseLinearDisplay/components/Block.tsx +15 -11
- package/src/BaseLinearDisplay/components/BlockMsg.tsx +9 -9
- package/src/BaseLinearDisplay/components/LinearBlocks.tsx +62 -58
- package/src/BaseLinearDisplay/{models → components}/TooLargeMessage.tsx +0 -0
- package/src/BaseLinearDisplay/index.ts +2 -1
- package/src/BaseLinearDisplay/models/BaseLinearDisplayModel.tsx +4 -3
- package/src/BaseLinearDisplay/models/{baseLinearDisplayConfigSchema.ts → configSchema.ts} +5 -3
- package/src/BaseLinearDisplay/models/serverSideRenderedBlock.ts +1 -1
- package/src/BaseLinearDisplay/models/util.ts +24 -0
- package/src/FeatureTrack/index.ts +5 -8
- package/src/LaunchLinearGenomeView/index.ts +66 -0
- package/src/LinearBareDisplay/index.ts +23 -2
- package/src/LinearBasicDisplay/components/SetMaxHeight.tsx +3 -28
- package/src/LinearBasicDisplay/index.ts +24 -2
- package/src/LinearBasicDisplay/model.ts +2 -1
- package/src/LinearGenomeView/README.md +2 -1
- package/src/LinearGenomeView/components/ExportSvgDialog.tsx +2 -23
- package/src/LinearGenomeView/components/GetSequenceDialog.tsx +13 -31
- package/src/LinearGenomeView/components/Header.tsx +3 -3
- package/src/LinearGenomeView/components/HelpDialog.tsx +8 -34
- package/src/LinearGenomeView/components/ImportForm.tsx +13 -9
- package/src/LinearGenomeView/components/LinearGenomeView.test.tsx +132 -134
- package/src/LinearGenomeView/components/LinearGenomeViewSvg.tsx +4 -5
- package/src/LinearGenomeView/components/{OverviewRubberBand.tsx → OverviewRubberband.tsx} +32 -114
- package/src/LinearGenomeView/components/{OverviewScaleBar.tsx → OverviewScalebar.tsx} +26 -25
- package/src/LinearGenomeView/components/RefNameAutocomplete.tsx +2 -1
- package/src/LinearGenomeView/components/Rubberband.tsx +89 -0
- package/src/LinearGenomeView/components/RubberbandSpan.tsx +116 -0
- package/src/LinearGenomeView/components/Ruler.tsx +11 -28
- package/src/LinearGenomeView/components/{ScaleBar.test.tsx → Scalebar.test.tsx} +5 -5
- package/src/LinearGenomeView/components/{ScaleBar.tsx → Scalebar.tsx} +11 -11
- package/src/LinearGenomeView/components/SearchBox.tsx +8 -6
- package/src/LinearGenomeView/components/SearchResultsDialog.tsx +17 -44
- package/src/LinearGenomeView/components/SequenceSearchDialog.tsx +4 -30
- package/src/LinearGenomeView/components/TrackContainer.tsx +4 -2
- package/src/LinearGenomeView/components/TracksContainer.tsx +59 -136
- package/src/LinearGenomeView/components/VerticalGuide.tsx +37 -0
- package/src/LinearGenomeView/components/__snapshots__/LinearGenomeView.test.tsx.snap +39 -44
- package/src/LinearGenomeView/components/hooks.ts +300 -0
- package/src/LinearGenomeView/components/util.ts +8 -11
- package/src/LinearGenomeView/index.test.ts +6 -7
- package/src/LinearGenomeView/index.ts +18 -0
- package/src/LinearGenomeView/{index.tsx → model.ts} +7 -4
- package/src/index.ts +16 -108
- package/dist/BaseLinearDisplay/models/TooLargeMessage.js.map +0 -1
- package/dist/BaseLinearDisplay/models/baseLinearDisplayConfigSchema.d.ts +0 -1
- package/dist/BaseLinearDisplay/models/baseLinearDisplayConfigSchema.js.map +0 -1
- package/dist/LinearGenomeView/components/OverviewRubberBand.js.map +0 -1
- package/dist/LinearGenomeView/components/OverviewScaleBar.js.map +0 -1
- package/dist/LinearGenomeView/components/RubberBand.js +0 -221
- package/dist/LinearGenomeView/components/RubberBand.js.map +0 -1
- package/esm/BaseLinearDisplay/models/TooLargeMessage.js.map +0 -1
- package/esm/BaseLinearDisplay/models/baseLinearDisplayConfigSchema.d.ts +0 -1
- package/esm/BaseLinearDisplay/models/baseLinearDisplayConfigSchema.js.map +0 -1
- package/esm/LinearGenomeView/components/OverviewRubberBand.js.map +0 -1
- package/esm/LinearGenomeView/components/OverviewScaleBar.js.map +0 -1
- package/esm/LinearGenomeView/components/RubberBand.js +0 -196
- package/esm/LinearGenomeView/components/RubberBand.js.map +0 -1
- package/src/LinearGenomeView/components/RubberBand.tsx +0 -308
|
@@ -16,6 +16,8 @@ import {
|
|
|
16
16
|
} from './Block'
|
|
17
17
|
import { LinearGenomeViewModel } from '../../LinearGenomeView'
|
|
18
18
|
|
|
19
|
+
type LGV = LinearGenomeViewModel
|
|
20
|
+
|
|
19
21
|
const useStyles = makeStyles()({
|
|
20
22
|
linearBlocks: {
|
|
21
23
|
whiteSpace: 'nowrap',
|
|
@@ -37,70 +39,72 @@ const useStyles = makeStyles()({
|
|
|
37
39
|
boxSizing: 'border-box',
|
|
38
40
|
},
|
|
39
41
|
})
|
|
40
|
-
const RenderedBlocks = observer(
|
|
41
|
-
({ model }: { model: BaseLinearDisplayModel }) => {
|
|
42
|
-
const { classes } = useStyles()
|
|
43
|
-
const { blockDefinitions, blockState } = model
|
|
44
|
-
return (
|
|
45
|
-
<>
|
|
46
|
-
{blockDefinitions.map(block => {
|
|
47
|
-
if (block instanceof ContentBlock) {
|
|
48
|
-
const state = blockState.get(block.key)
|
|
49
42
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
43
|
+
const RenderedBlocks = observer(function ({
|
|
44
|
+
model,
|
|
45
|
+
}: {
|
|
46
|
+
model: BaseLinearDisplayModel
|
|
47
|
+
}) {
|
|
48
|
+
const { classes } = useStyles()
|
|
49
|
+
const { blockDefinitions, blockState } = model
|
|
50
|
+
return (
|
|
51
|
+
<>
|
|
52
|
+
{blockDefinitions.map(block => {
|
|
53
|
+
if (block instanceof ContentBlock) {
|
|
54
|
+
const state = blockState.get(block.key)
|
|
55
|
+
|
|
56
|
+
return (
|
|
57
|
+
<ContentBlockComponent
|
|
58
|
+
block={block}
|
|
59
|
+
key={`${model.id}-${block.key}`}
|
|
60
|
+
>
|
|
61
|
+
{state && state.ReactComponent ? (
|
|
62
|
+
<state.ReactComponent model={state} />
|
|
63
|
+
) : null}
|
|
64
|
+
{state && state.maxHeightReached ? (
|
|
65
|
+
<div
|
|
66
|
+
className={classes.heightOverflowed}
|
|
67
|
+
style={{
|
|
68
|
+
top: state.layout.getTotalHeight() - 16,
|
|
69
|
+
pointerEvents: 'none',
|
|
70
|
+
height: 16,
|
|
71
|
+
}}
|
|
72
|
+
>
|
|
73
|
+
Max height reached
|
|
74
|
+
</div>
|
|
75
|
+
) : null}
|
|
76
|
+
</ContentBlockComponent>
|
|
77
|
+
)
|
|
78
|
+
}
|
|
79
|
+
if (block instanceof ElidedBlock) {
|
|
80
|
+
return (
|
|
81
|
+
<ElidedBlockComponent
|
|
82
|
+
key={`${model.id}-${block.key}`}
|
|
83
|
+
width={block.widthPx}
|
|
84
|
+
/>
|
|
85
|
+
)
|
|
86
|
+
}
|
|
87
|
+
if (block instanceof InterRegionPaddingBlock) {
|
|
88
|
+
return (
|
|
89
|
+
<InterRegionPaddingBlockComponent
|
|
90
|
+
key={block.key}
|
|
91
|
+
width={block.widthPx}
|
|
92
|
+
style={{ background: 'none' }}
|
|
93
|
+
boundary={block.variant === 'boundary'}
|
|
94
|
+
/>
|
|
95
|
+
)
|
|
96
|
+
}
|
|
97
|
+
throw new Error(`invalid block type ${typeof block}`)
|
|
98
|
+
})}
|
|
99
|
+
</>
|
|
100
|
+
)
|
|
101
|
+
})
|
|
97
102
|
function LinearBlocks({ model }: { model: BaseLinearDisplayModel }) {
|
|
98
103
|
const { classes } = useStyles()
|
|
99
104
|
const { blockDefinitions } = model
|
|
100
|
-
const viewModel = getContainingView(model) as
|
|
105
|
+
const viewModel = getContainingView(model) as LGV
|
|
101
106
|
return (
|
|
102
107
|
<div
|
|
103
|
-
data-testid="Blockset"
|
|
104
108
|
className={classes.linearBlocks}
|
|
105
109
|
style={{
|
|
106
110
|
left: blockDefinitions.offsetPx - viewModel.offsetPx,
|
|
File without changes
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { baseLinearDisplayConfigSchema } from './models/
|
|
1
|
+
export { default as baseLinearDisplayConfigSchema } from './models/configSchema'
|
|
2
2
|
export { BaseLinearDisplay } from './models/BaseLinearDisplayModel'
|
|
3
3
|
export type { BlockModel } from './models/serverSideRenderedBlock'
|
|
4
4
|
export type {
|
|
@@ -8,4 +8,5 @@ export type {
|
|
|
8
8
|
export {
|
|
9
9
|
default as BaseLinearDisplayComponent,
|
|
10
10
|
Tooltip,
|
|
11
|
+
BlockMsg,
|
|
11
12
|
} from './components/BaseLinearDisplay'
|
|
@@ -11,12 +11,13 @@ import {
|
|
|
11
11
|
getViewParams,
|
|
12
12
|
isSelectionContainer,
|
|
13
13
|
isSessionModelWithWidgets,
|
|
14
|
+
isFeature,
|
|
15
|
+
Feature,
|
|
14
16
|
} from '@jbrowse/core/util'
|
|
15
17
|
import { Stats } from '@jbrowse/core/data_adapters/BaseAdapter'
|
|
16
18
|
import { BaseBlock } from '@jbrowse/core/util/blockTypes'
|
|
17
19
|
import { Region } from '@jbrowse/core/util/types'
|
|
18
20
|
import CompositeMap from '@jbrowse/core/util/compositeMap'
|
|
19
|
-
import { Feature, isFeature } from '@jbrowse/core/util/simpleFeature'
|
|
20
21
|
import {
|
|
21
22
|
getParentRenderProps,
|
|
22
23
|
getRpcSessionId,
|
|
@@ -28,9 +29,9 @@ import { addDisposer, isAlive, types, Instance } from 'mobx-state-tree'
|
|
|
28
29
|
import MenuOpenIcon from '@mui/icons-material/MenuOpen'
|
|
29
30
|
|
|
30
31
|
// locals
|
|
31
|
-
import TooLargeMessage from './TooLargeMessage'
|
|
32
32
|
import { LinearGenomeViewModel, ExportSvgOptions } from '../../LinearGenomeView'
|
|
33
33
|
import { Tooltip } from '../components/BaseLinearDisplay'
|
|
34
|
+
import TooLargeMessage from '../components/TooLargeMessage'
|
|
34
35
|
import BlockState, { renderBlockData } from './serverSideRenderedBlock'
|
|
35
36
|
|
|
36
37
|
type LGV = LinearGenomeViewModel
|
|
@@ -104,10 +105,10 @@ function stateModelFactory() {
|
|
|
104
105
|
)
|
|
105
106
|
.volatile(() => ({
|
|
106
107
|
currBpPerPx: 0,
|
|
108
|
+
scrollTop: 0,
|
|
107
109
|
message: '',
|
|
108
110
|
featureIdUnderMouse: undefined as undefined | string,
|
|
109
111
|
contextMenuFeature: undefined as undefined | Feature,
|
|
110
|
-
scrollTop: 0,
|
|
111
112
|
estimatedRegionStatsP: undefined as undefined | Promise<Stats>,
|
|
112
113
|
estimatedRegionStats: undefined as undefined | Stats,
|
|
113
114
|
}))
|
|
@@ -2,13 +2,13 @@ import { ConfigurationSchema } from '@jbrowse/core/configuration'
|
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* #config BaseLinearDisplay
|
|
5
|
-
* BaseLinearDisplay is a "base" config that is extended by classes like
|
|
6
|
-
*
|
|
5
|
+
* `BaseLinearDisplay` is a "base" config that is extended by classes like
|
|
6
|
+
* `LinearBasicDisplay` (used for feature tracks, etc) and `LinearBareDisplay`
|
|
7
7
|
* (more stripped down than even the basic display, not commonly used)
|
|
8
8
|
*/
|
|
9
9
|
function x() {} // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
const baseLinearDisplayConfigSchema = ConfigurationSchema(
|
|
12
12
|
'BaseLinearDisplay',
|
|
13
13
|
{
|
|
14
14
|
/**
|
|
@@ -37,3 +37,5 @@ export const baseLinearDisplayConfigSchema = ConfigurationSchema(
|
|
|
37
37
|
explicitIdentifier: 'displayId',
|
|
38
38
|
},
|
|
39
39
|
)
|
|
40
|
+
|
|
41
|
+
export default baseLinearDisplayConfigSchema
|
|
@@ -173,7 +173,7 @@ const blockState = types
|
|
|
173
173
|
const { rpcManager } = getSession(self)
|
|
174
174
|
const { rendererType } = display
|
|
175
175
|
const { renderArgs } = renderBlockData(cast(self))
|
|
176
|
-
// renderArgs can be undefined if an error
|
|
176
|
+
// renderArgs can be undefined if an error occurred in this block
|
|
177
177
|
if (renderArgs) {
|
|
178
178
|
rendererType
|
|
179
179
|
.freeResourcesInClient(
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface RenderProps {
|
|
2
|
+
rendererType: any // eslint-disable-line @typescript-eslint/no-explicit-any
|
|
3
|
+
renderArgs: { [key: string]: any } // eslint-disable-line @typescript-eslint/no-explicit-any
|
|
4
|
+
renderProps: { [key: string]: any } // eslint-disable-line @typescript-eslint/no-explicit-any
|
|
5
|
+
displayError: unknown
|
|
6
|
+
rpcManager: { call: Function }
|
|
7
|
+
cannotBeRenderedReason: string
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface ErrorProps {
|
|
11
|
+
displayError: string
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export function getDisplayStr(totalBytes: number) {
|
|
15
|
+
let displayBp
|
|
16
|
+
if (Math.floor(totalBytes / 1000000) > 0) {
|
|
17
|
+
displayBp = `${parseFloat((totalBytes / 1000000).toPrecision(3))} Mb`
|
|
18
|
+
} else if (Math.floor(totalBytes / 1000) > 0) {
|
|
19
|
+
displayBp = `${parseFloat((totalBytes / 1000).toPrecision(3))} Kb`
|
|
20
|
+
} else {
|
|
21
|
+
displayBp = `${Math.floor(totalBytes)} bytes`
|
|
22
|
+
}
|
|
23
|
+
return displayBp
|
|
24
|
+
}
|
|
@@ -5,17 +5,14 @@ import {
|
|
|
5
5
|
import PluginManager from '@jbrowse/core/PluginManager'
|
|
6
6
|
import configSchemaF from './configSchema'
|
|
7
7
|
|
|
8
|
-
export default (
|
|
9
|
-
|
|
10
|
-
const configSchema = configSchemaF(
|
|
8
|
+
export default (pm: PluginManager) => {
|
|
9
|
+
pm.addTrackType(() => {
|
|
10
|
+
const configSchema = configSchemaF(pm)
|
|
11
11
|
return new TrackType({
|
|
12
12
|
name: 'FeatureTrack',
|
|
13
|
+
displayName: 'Feature track',
|
|
13
14
|
configSchema,
|
|
14
|
-
stateModel: createBaseTrackModel(
|
|
15
|
-
pluginManager,
|
|
16
|
-
'FeatureTrack',
|
|
17
|
-
configSchema,
|
|
18
|
-
),
|
|
15
|
+
stateModel: createBaseTrackModel(pm, 'FeatureTrack', configSchema),
|
|
19
16
|
})
|
|
20
17
|
})
|
|
21
18
|
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import PluginManager from '@jbrowse/core/PluginManager'
|
|
2
|
+
import { AbstractSessionModel, when } from '@jbrowse/core/util'
|
|
3
|
+
import { LinearGenomeViewModel } from '../LinearGenomeView'
|
|
4
|
+
|
|
5
|
+
type LGV = LinearGenomeViewModel
|
|
6
|
+
|
|
7
|
+
export default (pluginManager: PluginManager) => {
|
|
8
|
+
pluginManager.addToExtensionPoint(
|
|
9
|
+
'LaunchView-LinearGenomeView',
|
|
10
|
+
// @ts-ignore
|
|
11
|
+
async ({
|
|
12
|
+
session,
|
|
13
|
+
assembly,
|
|
14
|
+
loc,
|
|
15
|
+
tracks = [],
|
|
16
|
+
}: {
|
|
17
|
+
session: AbstractSessionModel
|
|
18
|
+
assembly?: string
|
|
19
|
+
loc: string
|
|
20
|
+
tracks?: string[]
|
|
21
|
+
}) => {
|
|
22
|
+
try {
|
|
23
|
+
const { assemblyManager } = session
|
|
24
|
+
const view = session.addView('LinearGenomeView', {}) as LGV
|
|
25
|
+
|
|
26
|
+
await when(() => !!view.volatileWidth)
|
|
27
|
+
|
|
28
|
+
if (!assembly) {
|
|
29
|
+
throw new Error(
|
|
30
|
+
'No assembly provided when launching linear genome view',
|
|
31
|
+
)
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const asm = await assemblyManager.waitForAssembly(assembly)
|
|
35
|
+
if (!asm) {
|
|
36
|
+
throw new Error(
|
|
37
|
+
`Assembly "${assembly}" not found when launching linear genome view`,
|
|
38
|
+
)
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
await view.navToLocString(loc, assembly)
|
|
42
|
+
|
|
43
|
+
const idsNotFound = [] as string[]
|
|
44
|
+
tracks.forEach(track => {
|
|
45
|
+
try {
|
|
46
|
+
view.showTrack(track)
|
|
47
|
+
} catch (e) {
|
|
48
|
+
if (`${e}`.match('Could not resolve identifier')) {
|
|
49
|
+
idsNotFound.push(track)
|
|
50
|
+
} else {
|
|
51
|
+
throw e
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
})
|
|
55
|
+
if (idsNotFound.length) {
|
|
56
|
+
throw new Error(
|
|
57
|
+
`Could not resolve identifiers: ${idsNotFound.join(',')}`,
|
|
58
|
+
)
|
|
59
|
+
}
|
|
60
|
+
} catch (e) {
|
|
61
|
+
session.notify(`${e}`, 'error')
|
|
62
|
+
throw e
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
)
|
|
66
|
+
}
|
|
@@ -1,2 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import PluginManager from '@jbrowse/core/PluginManager'
|
|
2
|
+
import { DisplayType } from '@jbrowse/core/pluggableElementTypes'
|
|
3
|
+
|
|
4
|
+
// locals
|
|
5
|
+
import { configSchemaFactory } from './configSchema'
|
|
6
|
+
import { stateModelFactory } from './model'
|
|
7
|
+
import { BaseLinearDisplayComponent } from '../BaseLinearDisplay/'
|
|
8
|
+
|
|
9
|
+
export default (pluginManager: PluginManager) => {
|
|
10
|
+
pluginManager.addDisplayType(() => {
|
|
11
|
+
const configSchema = configSchemaFactory(pluginManager)
|
|
12
|
+
return new DisplayType({
|
|
13
|
+
name: 'LinearBareDisplay',
|
|
14
|
+
configSchema,
|
|
15
|
+
stateModel: stateModelFactory(configSchema),
|
|
16
|
+
trackType: 'BasicTrack',
|
|
17
|
+
viewType: 'LinearGenomeView',
|
|
18
|
+
ReactComponent: BaseLinearDisplayComponent,
|
|
19
|
+
})
|
|
20
|
+
})
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export { configSchemaFactory, stateModelFactory }
|
|
@@ -1,29 +1,20 @@
|
|
|
1
1
|
import React, { useState } from 'react'
|
|
2
2
|
import { observer } from 'mobx-react'
|
|
3
|
+
import { Dialog } from '@jbrowse/core/ui'
|
|
3
4
|
import {
|
|
4
5
|
Button,
|
|
5
|
-
Dialog,
|
|
6
6
|
DialogActions,
|
|
7
7
|
DialogContent,
|
|
8
|
-
DialogTitle,
|
|
9
|
-
IconButton,
|
|
10
8
|
Typography,
|
|
11
9
|
TextField,
|
|
12
10
|
} from '@mui/material'
|
|
13
11
|
import { makeStyles } from 'tss-react/mui'
|
|
14
12
|
|
|
15
|
-
import CloseIcon from '@mui/icons-material/Close'
|
|
16
|
-
|
|
17
13
|
const useStyles = makeStyles()(theme => ({
|
|
18
14
|
root: {
|
|
19
15
|
width: 500,
|
|
20
16
|
},
|
|
21
|
-
|
|
22
|
-
position: 'absolute',
|
|
23
|
-
right: theme.spacing(1),
|
|
24
|
-
top: theme.spacing(1),
|
|
25
|
-
color: theme.palette.grey[500],
|
|
26
|
-
},
|
|
17
|
+
|
|
27
18
|
field: {
|
|
28
19
|
margin: theme.spacing(2),
|
|
29
20
|
},
|
|
@@ -44,23 +35,7 @@ function SetMaxHeightDlg({
|
|
|
44
35
|
const [max, setMax] = useState(`${maxHeight}`)
|
|
45
36
|
|
|
46
37
|
return (
|
|
47
|
-
<Dialog
|
|
48
|
-
open
|
|
49
|
-
onClose={handleClose}
|
|
50
|
-
aria-labelledby="alert-dialog-title"
|
|
51
|
-
aria-describedby="alert-dialog-description"
|
|
52
|
-
>
|
|
53
|
-
<DialogTitle id="alert-dialog-title">
|
|
54
|
-
Filter options
|
|
55
|
-
<IconButton
|
|
56
|
-
aria-label="close"
|
|
57
|
-
className={classes.closeButton}
|
|
58
|
-
onClick={handleClose}
|
|
59
|
-
size="large"
|
|
60
|
-
>
|
|
61
|
-
<CloseIcon />
|
|
62
|
-
</IconButton>
|
|
63
|
-
</DialogTitle>
|
|
38
|
+
<Dialog open onClose={handleClose} title="Set max height">
|
|
64
39
|
<DialogContent className={classes.root}>
|
|
65
40
|
<Typography>
|
|
66
41
|
Set max height for the track. For example, you can increase this if
|
|
@@ -1,2 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import PluginManager from '@jbrowse/core/PluginManager'
|
|
2
|
+
import { DisplayType } from '@jbrowse/core/pluggableElementTypes'
|
|
3
|
+
import { BaseLinearDisplayComponent } from '../BaseLinearDisplay'
|
|
4
|
+
|
|
5
|
+
// locals
|
|
6
|
+
import configSchema from './configSchema'
|
|
7
|
+
import modelFactory from './model'
|
|
8
|
+
|
|
9
|
+
export default (pluginManager: PluginManager) => {
|
|
10
|
+
pluginManager.addDisplayType(() => {
|
|
11
|
+
const config = configSchema(pluginManager)
|
|
12
|
+
return new DisplayType({
|
|
13
|
+
name: 'LinearBasicDisplay',
|
|
14
|
+
displayName: 'Basic deature display',
|
|
15
|
+
configSchema: config,
|
|
16
|
+
stateModel: modelFactory(config),
|
|
17
|
+
trackType: 'FeatureTrack',
|
|
18
|
+
viewType: 'LinearGenomeView',
|
|
19
|
+
ReactComponent: BaseLinearDisplayComponent,
|
|
20
|
+
})
|
|
21
|
+
})
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export { modelFactory, configSchema }
|
|
@@ -18,7 +18,8 @@ const SetMaxHeightDlg = lazy(() => import('./components/SetMaxHeight'))
|
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* #stateModel LinearBasicDisplay
|
|
21
|
-
* used by `FeatureTrack`, has simple settings like "show/hide feature labels",
|
|
21
|
+
* used by `FeatureTrack`, has simple settings like "show/hide feature labels",
|
|
22
|
+
* etc.
|
|
22
23
|
*/
|
|
23
24
|
function stateModelFactory(configSchema: AnyConfigurationSchemaType) {
|
|
24
25
|
return types
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# Key LinearGenomeView state fields
|
|
2
2
|
|
|
3
|
-
- displayedRegions - array of { refName, start, end }, tiled in the display left
|
|
3
|
+
- displayedRegions - array of { refName, start, end }, tiled in the display left
|
|
4
|
+
to right
|
|
4
5
|
- offsetPx - the offset in px of the left edge of the view
|
|
5
6
|
- bpPerPx - ratio of basepairs to screen pixels
|
|
6
7
|
- width - width in px of the view
|
|
@@ -1,31 +1,17 @@
|
|
|
1
1
|
import React, { useState } from 'react'
|
|
2
|
-
import { makeStyles } from 'tss-react/mui'
|
|
3
2
|
import {
|
|
4
3
|
Button,
|
|
5
4
|
Checkbox,
|
|
6
5
|
CircularProgress,
|
|
7
|
-
Dialog,
|
|
8
6
|
DialogActions,
|
|
9
7
|
DialogContent,
|
|
10
|
-
DialogTitle,
|
|
11
8
|
FormControlLabel,
|
|
12
|
-
IconButton,
|
|
13
9
|
TextField,
|
|
14
10
|
Typography,
|
|
15
11
|
} from '@mui/material'
|
|
16
|
-
import { ErrorMessage } from '@jbrowse/core/ui'
|
|
17
|
-
import CloseIcon from '@mui/icons-material/Close'
|
|
12
|
+
import { Dialog, ErrorMessage } from '@jbrowse/core/ui'
|
|
18
13
|
import { ExportSvgOptions } from '..'
|
|
19
14
|
|
|
20
|
-
const useStyles = makeStyles()(theme => ({
|
|
21
|
-
closeButton: {
|
|
22
|
-
position: 'absolute',
|
|
23
|
-
right: theme.spacing(1),
|
|
24
|
-
top: theme.spacing(1),
|
|
25
|
-
color: theme.palette.grey[500],
|
|
26
|
-
},
|
|
27
|
-
}))
|
|
28
|
-
|
|
29
15
|
function LoadingMessage() {
|
|
30
16
|
return (
|
|
31
17
|
<div>
|
|
@@ -48,15 +34,8 @@ export default function ExportSvgDlg({
|
|
|
48
34
|
const [loading, setLoading] = useState(false)
|
|
49
35
|
const [filename, setFilename] = useState('jbrowse.svg')
|
|
50
36
|
const [error, setError] = useState<unknown>()
|
|
51
|
-
const { classes } = useStyles()
|
|
52
37
|
return (
|
|
53
|
-
<Dialog open onClose={handleClose}>
|
|
54
|
-
<DialogTitle>
|
|
55
|
-
Export SVG
|
|
56
|
-
<IconButton className={classes.closeButton} onClick={handleClose}>
|
|
57
|
-
<CloseIcon />
|
|
58
|
-
</IconButton>
|
|
59
|
-
</DialogTitle>
|
|
38
|
+
<Dialog open onClose={handleClose} title="Export SVG">
|
|
60
39
|
<DialogContent>
|
|
61
40
|
{error ? (
|
|
62
41
|
<ErrorMessage error={error} />
|
|
@@ -4,12 +4,8 @@ import {
|
|
|
4
4
|
Button,
|
|
5
5
|
CircularProgress,
|
|
6
6
|
Container,
|
|
7
|
-
Dialog,
|
|
8
7
|
DialogActions,
|
|
9
8
|
DialogContent,
|
|
10
|
-
DialogTitle,
|
|
11
|
-
Divider,
|
|
12
|
-
IconButton,
|
|
13
9
|
TextField,
|
|
14
10
|
Typography,
|
|
15
11
|
} from '@mui/material'
|
|
@@ -17,31 +13,25 @@ import { observer } from 'mobx-react'
|
|
|
17
13
|
import { saveAs } from 'file-saver'
|
|
18
14
|
import { getConf } from '@jbrowse/core/configuration'
|
|
19
15
|
import copy from 'copy-to-clipboard'
|
|
16
|
+
import { Dialog } from '@jbrowse/core/ui'
|
|
20
17
|
import { getSession, Feature, Region } from '@jbrowse/core/util'
|
|
21
18
|
import { formatSeqFasta } from '@jbrowse/core/util/formatFastaStrings'
|
|
22
19
|
|
|
23
20
|
// icons
|
|
24
21
|
import { ContentCopy as ContentCopyIcon } from '@jbrowse/core/ui/Icons'
|
|
25
|
-
import CloseIcon from '@mui/icons-material/Close'
|
|
26
22
|
import GetAppIcon from '@mui/icons-material/GetApp'
|
|
27
23
|
|
|
28
24
|
// locals
|
|
29
25
|
import { LinearGenomeViewModel } from '..'
|
|
30
26
|
|
|
31
|
-
const useStyles = makeStyles()(
|
|
32
|
-
closeButton: {
|
|
33
|
-
position: 'absolute',
|
|
34
|
-
right: theme.spacing(1),
|
|
35
|
-
top: theme.spacing(1),
|
|
36
|
-
color: theme.palette.grey[500],
|
|
37
|
-
},
|
|
27
|
+
const useStyles = makeStyles()({
|
|
38
28
|
dialogContent: {
|
|
39
29
|
width: '80em',
|
|
40
30
|
},
|
|
41
31
|
textAreaFont: {
|
|
42
32
|
fontFamily: 'Courier New',
|
|
43
33
|
},
|
|
44
|
-
})
|
|
34
|
+
})
|
|
45
35
|
|
|
46
36
|
type LGV = LinearGenomeViewModel
|
|
47
37
|
|
|
@@ -106,6 +96,7 @@ function SequenceDialog({
|
|
|
106
96
|
let active = true
|
|
107
97
|
const controller = new AbortController()
|
|
108
98
|
|
|
99
|
+
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
109
100
|
;(async () => {
|
|
110
101
|
try {
|
|
111
102
|
if (regionsSelected.length > 0) {
|
|
@@ -157,24 +148,15 @@ function SequenceDialog({
|
|
|
157
148
|
const sequenceTooLarge = sequence ? sequence.length > 1_000_000 : false
|
|
158
149
|
|
|
159
150
|
return (
|
|
160
|
-
<Dialog
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
}}
|
|
170
|
-
size="large"
|
|
171
|
-
>
|
|
172
|
-
<CloseIcon />
|
|
173
|
-
</IconButton>
|
|
174
|
-
) : null}
|
|
175
|
-
</DialogTitle>
|
|
176
|
-
<Divider />
|
|
177
|
-
|
|
151
|
+
<Dialog
|
|
152
|
+
maxWidth="xl"
|
|
153
|
+
open
|
|
154
|
+
onClose={() => {
|
|
155
|
+
handleClose()
|
|
156
|
+
model.setOffsets(undefined, undefined)
|
|
157
|
+
}}
|
|
158
|
+
title="Reference sequence"
|
|
159
|
+
>
|
|
178
160
|
<DialogContent>
|
|
179
161
|
{error ? <Typography color="error">{`${error}`}</Typography> : null}
|
|
180
162
|
{loading && !error ? (
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
SPACING,
|
|
17
17
|
HEADER_BAR_HEIGHT,
|
|
18
18
|
} from '..'
|
|
19
|
-
import
|
|
19
|
+
import OverviewScalebar from './OverviewScalebar'
|
|
20
20
|
import ZoomControls from './ZoomControls'
|
|
21
21
|
import SearchBox from './SearchBox'
|
|
22
22
|
|
|
@@ -123,9 +123,9 @@ const LinearGenomeViewHeader = observer(({ model }: { model: LGV }) => {
|
|
|
123
123
|
model.hideHeaderOverview ? (
|
|
124
124
|
<Controls model={model} />
|
|
125
125
|
) : (
|
|
126
|
-
<
|
|
126
|
+
<OverviewScalebar model={model}>
|
|
127
127
|
<Controls model={model} />
|
|
128
|
-
</
|
|
128
|
+
</OverviewScalebar>
|
|
129
129
|
)
|
|
130
130
|
) : null
|
|
131
131
|
})
|