@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
|
@@ -1,45 +1,19 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
Dialog,
|
|
5
|
-
DialogActions,
|
|
6
|
-
DialogContent,
|
|
7
|
-
DialogTitle,
|
|
8
|
-
Divider,
|
|
9
|
-
IconButton,
|
|
10
|
-
} from '@mui/material'
|
|
11
|
-
import { makeStyles } from 'tss-react/mui'
|
|
12
|
-
import CloseIcon from '@mui/icons-material/Close'
|
|
13
|
-
|
|
14
|
-
const useStyles = makeStyles()(theme => ({
|
|
15
|
-
closeButton: {
|
|
16
|
-
position: 'absolute',
|
|
17
|
-
right: theme.spacing(1),
|
|
18
|
-
top: theme.spacing(1),
|
|
19
|
-
color: theme.palette.grey[500],
|
|
20
|
-
},
|
|
21
|
-
}))
|
|
2
|
+
import { Button, DialogActions, DialogContent, Divider } from '@mui/material'
|
|
3
|
+
import { Dialog } from '@jbrowse/core/ui'
|
|
22
4
|
|
|
23
5
|
export default function HelpDialog({
|
|
24
6
|
handleClose,
|
|
25
7
|
}: {
|
|
26
8
|
handleClose: () => void
|
|
27
9
|
}) {
|
|
28
|
-
const { classes } = useStyles()
|
|
29
10
|
return (
|
|
30
|
-
<Dialog
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
onClick={() => handleClose()}
|
|
37
|
-
>
|
|
38
|
-
<CloseIcon />
|
|
39
|
-
</IconButton>
|
|
40
|
-
) : null}
|
|
41
|
-
</DialogTitle>
|
|
42
|
-
<Divider />
|
|
11
|
+
<Dialog
|
|
12
|
+
open
|
|
13
|
+
maxWidth="xl"
|
|
14
|
+
onClose={handleClose}
|
|
15
|
+
title="Using the search box"
|
|
16
|
+
>
|
|
43
17
|
<DialogContent>
|
|
44
18
|
<h3>Searching</h3>
|
|
45
19
|
<ul>
|
|
@@ -62,11 +62,11 @@ const ImportForm = observer(({ model }: { model: LGV }) => {
|
|
|
62
62
|
setValue(r0)
|
|
63
63
|
}, [r0, selectedAsm])
|
|
64
64
|
|
|
65
|
-
function navToOption(option: BaseResult) {
|
|
65
|
+
async function navToOption(option: BaseResult) {
|
|
66
66
|
const location = option.getLocation()
|
|
67
67
|
const trackId = option.getTrackId()
|
|
68
68
|
if (location) {
|
|
69
|
-
model.navToLocString(location, selectedAsm)
|
|
69
|
+
await model.navToLocString(location, selectedAsm)
|
|
70
70
|
if (trackId) {
|
|
71
71
|
model.showTrack(trackId)
|
|
72
72
|
}
|
|
@@ -81,7 +81,9 @@ const ImportForm = observer(({ model }: { model: LGV }) => {
|
|
|
81
81
|
async function handleSelectedRegion(input: string) {
|
|
82
82
|
try {
|
|
83
83
|
if (option?.getDisplayString() === input && option.hasLocation()) {
|
|
84
|
-
navToOption(option)
|
|
84
|
+
await navToOption(option)
|
|
85
|
+
} else if (option?.results?.length) {
|
|
86
|
+
model.setSearchResults(option.results, option.getLabel())
|
|
85
87
|
} else {
|
|
86
88
|
const [ref, rest] = splitLast(input, ':')
|
|
87
89
|
const allRefs = assembly?.allRefNamesWithLowerCase || []
|
|
@@ -89,7 +91,7 @@ const ImportForm = observer(({ model }: { model: LGV }) => {
|
|
|
89
91
|
allRefs.includes(input) ||
|
|
90
92
|
(allRefs.includes(ref) && !Number.isNaN(parseInt(rest, 10)))
|
|
91
93
|
) {
|
|
92
|
-
model.navToLocString(input, selectedAsm)
|
|
94
|
+
await model.navToLocString(input, selectedAsm)
|
|
93
95
|
} else {
|
|
94
96
|
const results = await fetchResults({
|
|
95
97
|
queryString: input,
|
|
@@ -103,9 +105,9 @@ const ImportForm = observer(({ model }: { model: LGV }) => {
|
|
|
103
105
|
if (results.length > 1) {
|
|
104
106
|
model.setSearchResults(results, input.toLowerCase())
|
|
105
107
|
} else if (results.length === 1) {
|
|
106
|
-
navToOption(results[0])
|
|
108
|
+
await navToOption(results[0])
|
|
107
109
|
} else {
|
|
108
|
-
model.navToLocString(input, selectedAsm)
|
|
110
|
+
await model.navToLocString(input, selectedAsm)
|
|
109
111
|
}
|
|
110
112
|
}
|
|
111
113
|
}
|
|
@@ -122,11 +124,12 @@ const ImportForm = observer(({ model }: { model: LGV }) => {
|
|
|
122
124
|
{displayError ? <ErrorMessage error={displayError} /> : null}
|
|
123
125
|
<Container className={classes.importFormContainer}>
|
|
124
126
|
<form
|
|
125
|
-
onSubmit={event => {
|
|
127
|
+
onSubmit={async event => {
|
|
126
128
|
event.preventDefault()
|
|
127
129
|
model.setError(undefined)
|
|
128
130
|
if (value) {
|
|
129
|
-
|
|
131
|
+
// has it's own error handling
|
|
132
|
+
await handleSelectedRegion(value)
|
|
130
133
|
}
|
|
131
134
|
}}
|
|
132
135
|
>
|
|
@@ -143,6 +146,7 @@ const ImportForm = observer(({ model }: { model: LGV }) => {
|
|
|
143
146
|
setSelectedAsm(val)
|
|
144
147
|
setValue('')
|
|
145
148
|
}}
|
|
149
|
+
localStorageKey="lgv"
|
|
146
150
|
session={session}
|
|
147
151
|
selected={selectedAsm}
|
|
148
152
|
/>
|
|
@@ -167,7 +171,7 @@ const ImportForm = observer(({ model }: { model: LGV }) => {
|
|
|
167
171
|
model={model}
|
|
168
172
|
assemblyName={assemblyError ? undefined : selectedAsm}
|
|
169
173
|
value={value}
|
|
170
|
-
// note: minWidth 270
|
|
174
|
+
// note: minWidth 270 accommodates full width of helperText
|
|
171
175
|
minWidth={270}
|
|
172
176
|
onChange={str => setValue(str)}
|
|
173
177
|
onSelect={val => setOption(val)}
|
|
@@ -30,143 +30,141 @@ const assemblyConf = {
|
|
|
30
30
|
},
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}, 15000)
|
|
49
|
-
|
|
50
|
-
it('renders one track, one region', async () => {
|
|
51
|
-
const session = createTestSession()
|
|
52
|
-
session.addAssemblyConf(assemblyConf)
|
|
53
|
-
session.addTrackConf({
|
|
54
|
-
trackId: 'testConfig',
|
|
55
|
-
assemblyNames: ['volMyt1'],
|
|
56
|
-
name: 'Foo Track',
|
|
57
|
-
type: 'BasicTrack',
|
|
58
|
-
adapter: { type: 'FromConfigAdapter', features: [] },
|
|
59
|
-
})
|
|
60
|
-
session.addView('LinearGenomeView', {
|
|
61
|
-
type: 'LinearGenomeView',
|
|
62
|
-
id: 'lgv',
|
|
63
|
-
offsetPx: 0,
|
|
64
|
-
bpPerPx: 1,
|
|
65
|
-
tracks: [
|
|
66
|
-
{
|
|
67
|
-
id: 'foo',
|
|
68
|
-
type: 'BasicTrack',
|
|
69
|
-
height: 20,
|
|
70
|
-
configuration: 'testConfig',
|
|
71
|
-
displays: [
|
|
72
|
-
{
|
|
73
|
-
type: 'LinearBareDisplay',
|
|
74
|
-
configuration: 'testConfig-LinearBareDisplay',
|
|
75
|
-
},
|
|
76
|
-
],
|
|
77
|
-
},
|
|
78
|
-
],
|
|
79
|
-
displayedRegions: [
|
|
80
|
-
{ assemblyName: 'volMyt1', refName: 'ctgA', start: 0, end: 100 },
|
|
81
|
-
],
|
|
82
|
-
})
|
|
83
|
-
const model = session.views[0]
|
|
84
|
-
model.setWidth(800)
|
|
85
|
-
const { container, queryByText, getByPlaceholderText, findByText } = render(
|
|
86
|
-
<LinearGenomeView model={model} />,
|
|
87
|
-
)
|
|
88
|
-
await findByText('Foo Track')
|
|
89
|
-
// test needs to wait until it's updated to display 100 bp in the header to
|
|
90
|
-
// make snapshot pass
|
|
91
|
-
await findByText('100bp')
|
|
33
|
+
test('renders setup wizard', async () => {
|
|
34
|
+
const session = createTestSession()
|
|
35
|
+
session.addAssemblyConf(assemblyConf)
|
|
36
|
+
session.addView('LinearGenomeView', { id: 'lgv' })
|
|
37
|
+
const model = session.views[0]
|
|
38
|
+
model.setWidth(800)
|
|
39
|
+
const { findByText } = render(<LinearGenomeView model={model} />)
|
|
40
|
+
expect(model.displayedRegions.length).toEqual(0)
|
|
41
|
+
const elt = await findByText('Open')
|
|
42
|
+
await waitFor(() => expect(elt.getAttribute('disabled')).toBe(null))
|
|
43
|
+
fireEvent.click(elt)
|
|
44
|
+
await waitFor(() => expect(model.displayedRegions.length).toEqual(1), {
|
|
45
|
+
timeout: 15000,
|
|
46
|
+
})
|
|
47
|
+
}, 15000)
|
|
92
48
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
49
|
+
test('renders one track, one region', async () => {
|
|
50
|
+
const session = createTestSession()
|
|
51
|
+
session.addAssemblyConf(assemblyConf)
|
|
52
|
+
session.addTrackConf({
|
|
53
|
+
trackId: 'testConfig',
|
|
54
|
+
assemblyNames: ['volMyt1'],
|
|
55
|
+
name: 'Foo Track',
|
|
56
|
+
type: 'BasicTrack',
|
|
57
|
+
adapter: { type: 'FromConfigAdapter', features: [] },
|
|
100
58
|
})
|
|
59
|
+
session.addView('LinearGenomeView', {
|
|
60
|
+
type: 'LinearGenomeView',
|
|
61
|
+
id: 'lgv',
|
|
62
|
+
offsetPx: 0,
|
|
63
|
+
bpPerPx: 1,
|
|
64
|
+
tracks: [
|
|
65
|
+
{
|
|
66
|
+
id: 'foo',
|
|
67
|
+
type: 'BasicTrack',
|
|
68
|
+
height: 20,
|
|
69
|
+
configuration: 'testConfig',
|
|
70
|
+
displays: [
|
|
71
|
+
{
|
|
72
|
+
type: 'LinearBareDisplay',
|
|
73
|
+
configuration: 'testConfig-LinearBareDisplay',
|
|
74
|
+
},
|
|
75
|
+
],
|
|
76
|
+
},
|
|
77
|
+
],
|
|
78
|
+
displayedRegions: [
|
|
79
|
+
{ assemblyName: 'volMyt1', refName: 'ctgA', start: 0, end: 100 },
|
|
80
|
+
],
|
|
81
|
+
})
|
|
82
|
+
const model = session.views[0]
|
|
83
|
+
model.setWidth(800)
|
|
84
|
+
const { container, queryByText, getByPlaceholderText, findByText } = render(
|
|
85
|
+
<LinearGenomeView model={model} />,
|
|
86
|
+
)
|
|
87
|
+
await findByText('Foo Track')
|
|
88
|
+
// test needs to wait until it's updated to display 100 bp in the header to
|
|
89
|
+
// make snapshot pass
|
|
90
|
+
await findByText('100bp')
|
|
101
91
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
adapter: { type: 'FromConfigAdapter', features: [] },
|
|
111
|
-
})
|
|
92
|
+
await waitFor(() => {
|
|
93
|
+
expect(
|
|
94
|
+
(getByPlaceholderText('Search for location') as HTMLInputElement).value,
|
|
95
|
+
).toEqual('ctgA:1..100')
|
|
96
|
+
})
|
|
97
|
+
await waitFor(() => expect(queryByText('Loading')).not.toBeInTheDocument())
|
|
98
|
+
expect(container.firstChild).toMatchSnapshot()
|
|
99
|
+
})
|
|
112
100
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
bpPerPx: 1,
|
|
124
|
-
displayedRegions: [
|
|
125
|
-
{ assemblyName: 'volMyt1', refName: 'ctgA', start: 0, end: 100 },
|
|
126
|
-
{
|
|
127
|
-
assemblyName: 'volMyt1',
|
|
128
|
-
refName: 'ctgB',
|
|
129
|
-
start: 1000,
|
|
130
|
-
end: 2000,
|
|
131
|
-
},
|
|
132
|
-
],
|
|
133
|
-
tracks: [
|
|
134
|
-
{
|
|
135
|
-
id: 'foo',
|
|
136
|
-
type: 'BasicTrack',
|
|
137
|
-
height: 20,
|
|
138
|
-
configuration: 'testConfig',
|
|
139
|
-
displays: [
|
|
140
|
-
{
|
|
141
|
-
type: 'LinearBareDisplay',
|
|
142
|
-
configuration: 'testConfig-LinearBareDisplay',
|
|
143
|
-
},
|
|
144
|
-
],
|
|
145
|
-
},
|
|
146
|
-
{
|
|
147
|
-
id: 'bar',
|
|
148
|
-
type: 'BasicTrack',
|
|
149
|
-
height: 20,
|
|
150
|
-
configuration: 'testConfig2',
|
|
151
|
-
displays: [
|
|
152
|
-
{
|
|
153
|
-
type: 'LinearBareDisplay',
|
|
154
|
-
configuration: 'testConfig2-LinearBareDisplay',
|
|
155
|
-
},
|
|
156
|
-
],
|
|
157
|
-
},
|
|
158
|
-
],
|
|
159
|
-
})
|
|
160
|
-
const model = session.views[0]
|
|
161
|
-
model.setWidth(800)
|
|
162
|
-
const { container, findByText, queryByText, findAllByTestId } = render(
|
|
163
|
-
<LinearGenomeView model={model} />,
|
|
164
|
-
)
|
|
165
|
-
await findByText('Foo Track')
|
|
166
|
-
await findByText('798bp')
|
|
167
|
-
await findAllByTestId('svgfeatures')
|
|
168
|
-
await waitFor(() => expect(queryByText('Loading')).not.toBeInTheDocument())
|
|
101
|
+
test('renders two tracks, two regions', async () => {
|
|
102
|
+
const session = createTestSession()
|
|
103
|
+
session.addAssemblyConf(assemblyConf)
|
|
104
|
+
session.addTrackConf({
|
|
105
|
+
trackId: 'testConfig',
|
|
106
|
+
name: 'Foo Track',
|
|
107
|
+
assemblyNames: ['volMyt1'],
|
|
108
|
+
type: 'BasicTrack',
|
|
109
|
+
adapter: { type: 'FromConfigAdapter', features: [] },
|
|
110
|
+
})
|
|
169
111
|
|
|
170
|
-
|
|
112
|
+
session.addTrackConf({
|
|
113
|
+
trackId: 'testConfig2',
|
|
114
|
+
name: 'Bar Track',
|
|
115
|
+
assemblyNames: ['volMyt1'],
|
|
116
|
+
type: 'BasicTrack',
|
|
117
|
+
adapter: { type: 'FromConfigAdapter', features: [] },
|
|
171
118
|
})
|
|
172
|
-
|
|
119
|
+
session.addView('LinearGenomeView', {
|
|
120
|
+
id: 'lgv',
|
|
121
|
+
offsetPx: 0,
|
|
122
|
+
bpPerPx: 1,
|
|
123
|
+
displayedRegions: [
|
|
124
|
+
{ assemblyName: 'volMyt1', refName: 'ctgA', start: 0, end: 100 },
|
|
125
|
+
{
|
|
126
|
+
assemblyName: 'volMyt1',
|
|
127
|
+
refName: 'ctgB',
|
|
128
|
+
start: 1000,
|
|
129
|
+
end: 2000,
|
|
130
|
+
},
|
|
131
|
+
],
|
|
132
|
+
tracks: [
|
|
133
|
+
{
|
|
134
|
+
id: 'foo',
|
|
135
|
+
type: 'BasicTrack',
|
|
136
|
+
height: 20,
|
|
137
|
+
configuration: 'testConfig',
|
|
138
|
+
displays: [
|
|
139
|
+
{
|
|
140
|
+
type: 'LinearBareDisplay',
|
|
141
|
+
configuration: 'testConfig-LinearBareDisplay',
|
|
142
|
+
},
|
|
143
|
+
],
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
id: 'bar',
|
|
147
|
+
type: 'BasicTrack',
|
|
148
|
+
height: 20,
|
|
149
|
+
configuration: 'testConfig2',
|
|
150
|
+
displays: [
|
|
151
|
+
{
|
|
152
|
+
type: 'LinearBareDisplay',
|
|
153
|
+
configuration: 'testConfig2-LinearBareDisplay',
|
|
154
|
+
},
|
|
155
|
+
],
|
|
156
|
+
},
|
|
157
|
+
],
|
|
158
|
+
})
|
|
159
|
+
const model = session.views[0]
|
|
160
|
+
model.setWidth(800)
|
|
161
|
+
const { container, findByText, queryByText, findAllByTestId } = render(
|
|
162
|
+
<LinearGenomeView model={model} />,
|
|
163
|
+
)
|
|
164
|
+
await findByText('Foo Track')
|
|
165
|
+
await findByText('798bp')
|
|
166
|
+
await findAllByTestId('svgfeatures', {}, { timeout: 10000 })
|
|
167
|
+
await waitFor(() => expect(queryByText('Loading')).not.toBeInTheDocument())
|
|
168
|
+
|
|
169
|
+
expect(container.firstChild).toMatchSnapshot()
|
|
170
|
+
}, 15000)
|
|
@@ -14,11 +14,11 @@ import {
|
|
|
14
14
|
ExportSvgOptions,
|
|
15
15
|
HEADER_OVERVIEW_HEIGHT,
|
|
16
16
|
} from '..'
|
|
17
|
-
import { Polygon, Cytobands } from './
|
|
17
|
+
import { Polygon, Cytobands } from './OverviewScalebar'
|
|
18
18
|
|
|
19
19
|
type LGV = LinearGenomeViewModel
|
|
20
20
|
|
|
21
|
-
function
|
|
21
|
+
function Scalebar({ model, fontSize }: { model: LGV; fontSize: number }) {
|
|
22
22
|
const {
|
|
23
23
|
offsetPx,
|
|
24
24
|
dynamicBlocks: { totalWidthPxWithoutBorders: totalWidthPx, totalBp },
|
|
@@ -178,7 +178,7 @@ const SVGHeader = ({ model }: { model: LGV }) => {
|
|
|
178
178
|
) : null}
|
|
179
179
|
|
|
180
180
|
<g transform={`translate(0 ${fontSize + cytobandHeight})`}>
|
|
181
|
-
<
|
|
181
|
+
<Scalebar model={model} fontSize={fontSize} />
|
|
182
182
|
</g>
|
|
183
183
|
<g transform={`translate(0 ${rulerHeight + cytobandHeight})`}>
|
|
184
184
|
<SVGRuler model={model} fontSize={fontSize} width={width} />
|
|
@@ -276,8 +276,7 @@ export async function renderToSvg(model: LGV, opts: ExportSvgOptions) {
|
|
|
276
276
|
tracks.map(async track => {
|
|
277
277
|
const display = track.displays[0]
|
|
278
278
|
await when(() => (display.ready !== undefined ? display.ready : true))
|
|
279
|
-
|
|
280
|
-
return { track, result }
|
|
279
|
+
return { track, result: await display.renderSvg(opts) }
|
|
281
280
|
}),
|
|
282
281
|
)
|
|
283
282
|
|
|
@@ -1,51 +1,28 @@
|
|
|
1
1
|
import React, { useRef, useEffect, useState } from 'react'
|
|
2
|
-
import {
|
|
2
|
+
import { Tooltip } from '@mui/material'
|
|
3
3
|
import { makeStyles } from 'tss-react/mui'
|
|
4
4
|
import { getSession, stringify } from '@jbrowse/core/util'
|
|
5
5
|
import { observer } from 'mobx-react'
|
|
6
6
|
import { Base1DViewModel } from '@jbrowse/core/util/Base1DViewModel'
|
|
7
|
-
import { LinearGenomeViewModel
|
|
7
|
+
import { LinearGenomeViewModel } from '..'
|
|
8
|
+
import RubberbandSpan from './RubberbandSpan'
|
|
9
|
+
import { getRelativeX } from './util'
|
|
8
10
|
|
|
9
11
|
type LGV = LinearGenomeViewModel
|
|
10
12
|
|
|
11
|
-
const useStyles = makeStyles()(
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
:
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
},
|
|
25
|
-
rubberBandControl: {
|
|
26
|
-
cursor: 'crosshair',
|
|
27
|
-
width: '100%',
|
|
28
|
-
minHeight: 8,
|
|
29
|
-
},
|
|
30
|
-
rubberBandText: {
|
|
31
|
-
color: tertiary ? tertiary.contrastText : primary.contrastText,
|
|
32
|
-
},
|
|
33
|
-
popover: {
|
|
34
|
-
mouseEvents: 'none',
|
|
35
|
-
cursor: 'crosshair',
|
|
36
|
-
},
|
|
37
|
-
paper: {
|
|
38
|
-
paddingLeft: theme.spacing(1),
|
|
39
|
-
paddingRight: theme.spacing(1),
|
|
40
|
-
},
|
|
41
|
-
guide: {
|
|
42
|
-
pointerEvents: 'none',
|
|
43
|
-
height: '100%',
|
|
44
|
-
width: 1,
|
|
45
|
-
position: 'absolute',
|
|
46
|
-
zIndex: 10,
|
|
47
|
-
},
|
|
48
|
-
}
|
|
13
|
+
const useStyles = makeStyles()({
|
|
14
|
+
rubberbandControl: {
|
|
15
|
+
cursor: 'crosshair',
|
|
16
|
+
width: '100%',
|
|
17
|
+
minHeight: 8,
|
|
18
|
+
},
|
|
19
|
+
guide: {
|
|
20
|
+
pointerEvents: 'none',
|
|
21
|
+
height: '100%',
|
|
22
|
+
width: 1,
|
|
23
|
+
position: 'absolute',
|
|
24
|
+
zIndex: 10,
|
|
25
|
+
},
|
|
49
26
|
})
|
|
50
27
|
|
|
51
28
|
const HoverTooltip = observer(
|
|
@@ -91,7 +68,7 @@ const HoverTooltip = observer(
|
|
|
91
68
|
},
|
|
92
69
|
)
|
|
93
70
|
|
|
94
|
-
function
|
|
71
|
+
function OverviewRubberband({
|
|
95
72
|
model,
|
|
96
73
|
overview,
|
|
97
74
|
ControlComponent = <div />,
|
|
@@ -105,7 +82,6 @@ function OverviewRubberBand({
|
|
|
105
82
|
const [currentX, setCurrentX] = useState<number>()
|
|
106
83
|
const [guideX, setGuideX] = useState<number>()
|
|
107
84
|
const controlsRef = useRef<HTMLDivElement>(null)
|
|
108
|
-
const rubberBandRef = useRef<HTMLDivElement>(null)
|
|
109
85
|
const { classes } = useStyles()
|
|
110
86
|
const mouseDragging = startX !== undefined
|
|
111
87
|
|
|
@@ -113,8 +89,7 @@ function OverviewRubberBand({
|
|
|
113
89
|
function globalMouseMove(event: MouseEvent) {
|
|
114
90
|
const ref = controlsRef.current
|
|
115
91
|
if (ref && mouseDragging) {
|
|
116
|
-
|
|
117
|
-
setCurrentX(relativeX)
|
|
92
|
+
setCurrentX(getRelativeX(event, ref))
|
|
118
93
|
}
|
|
119
94
|
}
|
|
120
95
|
|
|
@@ -172,19 +147,11 @@ function OverviewRubberBand({
|
|
|
172
147
|
function mouseDown(event: React.MouseEvent<HTMLDivElement>) {
|
|
173
148
|
event.preventDefault()
|
|
174
149
|
event.stopPropagation()
|
|
175
|
-
|
|
176
|
-
setStartX(
|
|
177
|
-
event.clientX - controlsRef.current.getBoundingClientRect().left,
|
|
178
|
-
)
|
|
179
|
-
}
|
|
150
|
+
setStartX(getRelativeX(event, controlsRef.current))
|
|
180
151
|
}
|
|
181
152
|
|
|
182
153
|
function mouseMove(event: React.MouseEvent<HTMLDivElement>) {
|
|
183
|
-
|
|
184
|
-
setGuideX(
|
|
185
|
-
event.clientX - controlsRef.current.getBoundingClientRect().left,
|
|
186
|
-
)
|
|
187
|
-
}
|
|
154
|
+
setGuideX(getRelativeX(event, controlsRef.current))
|
|
188
155
|
}
|
|
189
156
|
|
|
190
157
|
function mouseOut() {
|
|
@@ -203,7 +170,7 @@ function OverviewRubberBand({
|
|
|
203
170
|
/>
|
|
204
171
|
) : null}
|
|
205
172
|
<div
|
|
206
|
-
className={classes.
|
|
173
|
+
className={classes.rubberbandControl}
|
|
207
174
|
role="presentation"
|
|
208
175
|
ref={controlsRef}
|
|
209
176
|
onMouseDown={mouseDown}
|
|
@@ -235,66 +202,17 @@ function OverviewRubberBand({
|
|
|
235
202
|
|
|
236
203
|
return (
|
|
237
204
|
<div style={{ position: 'relative' }}>
|
|
238
|
-
{
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
open
|
|
246
|
-
anchorEl={rubberBandRef.current}
|
|
247
|
-
anchorOrigin={{
|
|
248
|
-
vertical: 'top',
|
|
249
|
-
horizontal: 'left',
|
|
250
|
-
}}
|
|
251
|
-
transformOrigin={{
|
|
252
|
-
vertical: 'bottom',
|
|
253
|
-
horizontal: 'right',
|
|
254
|
-
}}
|
|
255
|
-
keepMounted
|
|
256
|
-
disableRestoreFocus
|
|
257
|
-
>
|
|
258
|
-
<Typography>
|
|
259
|
-
{leftBpOffset ? stringify(leftBpOffset) : ''}
|
|
260
|
-
</Typography>
|
|
261
|
-
</Popover>
|
|
262
|
-
<Popover
|
|
263
|
-
className={classes.popover}
|
|
264
|
-
classes={{
|
|
265
|
-
paper: classes.paper,
|
|
266
|
-
}}
|
|
267
|
-
open
|
|
268
|
-
anchorEl={rubberBandRef.current}
|
|
269
|
-
anchorOrigin={{
|
|
270
|
-
vertical: 'top',
|
|
271
|
-
horizontal: 'right',
|
|
272
|
-
}}
|
|
273
|
-
transformOrigin={{
|
|
274
|
-
vertical: 'bottom',
|
|
275
|
-
horizontal: 'left',
|
|
276
|
-
}}
|
|
277
|
-
keepMounted
|
|
278
|
-
disableRestoreFocus
|
|
279
|
-
>
|
|
280
|
-
<Typography>
|
|
281
|
-
{rightBpOffset ? stringify(rightBpOffset) : ''}
|
|
282
|
-
</Typography>
|
|
283
|
-
</Popover>
|
|
284
|
-
</>
|
|
205
|
+
{leftBpOffset && rightBpOffset ? (
|
|
206
|
+
<RubberbandSpan
|
|
207
|
+
leftBpOffset={leftBpOffset}
|
|
208
|
+
rightBpOffset={rightBpOffset}
|
|
209
|
+
width={width}
|
|
210
|
+
left={left}
|
|
211
|
+
/>
|
|
285
212
|
) : null}
|
|
286
213
|
<div
|
|
287
|
-
|
|
288
|
-
className={classes.
|
|
289
|
-
style={{
|
|
290
|
-
left,
|
|
291
|
-
width: Math.abs(width),
|
|
292
|
-
height: HEADER_OVERVIEW_HEIGHT,
|
|
293
|
-
}}
|
|
294
|
-
/>
|
|
295
|
-
<div
|
|
296
|
-
data-testid="rubberBand_controls"
|
|
297
|
-
className={classes.rubberBandControl}
|
|
214
|
+
data-testid="rubberband_controls"
|
|
215
|
+
className={classes.rubberbandControl}
|
|
298
216
|
role="presentation"
|
|
299
217
|
ref={controlsRef}
|
|
300
218
|
onMouseDown={mouseDown}
|
|
@@ -307,4 +225,4 @@ function OverviewRubberBand({
|
|
|
307
225
|
)
|
|
308
226
|
}
|
|
309
227
|
|
|
310
|
-
export default observer(
|
|
228
|
+
export default observer(OverviewRubberband)
|