@jbrowse/plugin-linear-genome-view 1.7.11 → 2.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.
- package/dist/BaseLinearDisplay/components/BaseLinearDisplay.js +119 -139
- package/dist/BaseLinearDisplay/components/BaseLinearDisplay.js.map +1 -0
- package/dist/BaseLinearDisplay/components/Block.js +53 -74
- package/dist/BaseLinearDisplay/components/Block.js.map +1 -0
- package/dist/BaseLinearDisplay/components/LinearBlocks.d.ts +11 -1
- package/dist/BaseLinearDisplay/components/LinearBlocks.js +64 -103
- package/dist/BaseLinearDisplay/components/LinearBlocks.js.map +1 -0
- package/dist/BaseLinearDisplay/components/ServerSideRenderedBlockContent.js +146 -175
- package/dist/BaseLinearDisplay/components/ServerSideRenderedBlockContent.js.map +1 -0
- package/dist/BaseLinearDisplay/components/Tooltip.js +109 -116
- package/dist/BaseLinearDisplay/components/Tooltip.js.map +1 -0
- package/dist/BaseLinearDisplay/index.js +13 -40
- package/dist/BaseLinearDisplay/index.js.map +1 -0
- package/dist/BaseLinearDisplay/models/BaseLinearDisplayModel.d.ts +19 -14
- package/dist/BaseLinearDisplay/models/BaseLinearDisplayModel.js +605 -684
- package/dist/BaseLinearDisplay/models/BaseLinearDisplayModel.js.map +1 -0
- package/dist/BaseLinearDisplay/models/baseLinearDisplayConfigSchema.js +15 -22
- package/dist/BaseLinearDisplay/models/baseLinearDisplayConfigSchema.js.map +1 -0
- package/dist/BaseLinearDisplay/models/serverSideRenderedBlock.d.ts +7 -8
- package/dist/BaseLinearDisplay/models/serverSideRenderedBlock.js +266 -312
- package/dist/BaseLinearDisplay/models/serverSideRenderedBlock.js.map +1 -0
- package/dist/LinearBareDisplay/configSchema.js +11 -17
- package/dist/LinearBareDisplay/configSchema.js.map +1 -0
- package/dist/LinearBareDisplay/index.js +7 -20
- package/dist/LinearBareDisplay/index.js.map +1 -0
- package/dist/LinearBareDisplay/model.d.ts +15 -13
- package/dist/LinearBareDisplay/model.js +36 -42
- package/dist/LinearBareDisplay/model.js.map +1 -0
- package/dist/LinearBasicDisplay/components/SetMaxHeight.d.ts +1 -1
- package/dist/LinearBasicDisplay/components/SetMaxHeight.js +76 -85
- package/dist/LinearBasicDisplay/components/SetMaxHeight.js.map +1 -0
- package/dist/LinearBasicDisplay/configSchema.js +15 -23
- package/dist/LinearBasicDisplay/configSchema.js.map +1 -0
- package/dist/LinearBasicDisplay/index.js +10 -22
- package/dist/LinearBasicDisplay/index.js.map +1 -0
- package/dist/LinearBasicDisplay/model.d.ts +20 -14
- package/dist/LinearBasicDisplay/model.js +180 -159
- package/dist/LinearBasicDisplay/model.js.map +1 -0
- package/dist/LinearGenomeView/components/CenterLine.d.ts +2 -8
- package/dist/LinearGenomeView/components/CenterLine.js +60 -74
- package/dist/LinearGenomeView/components/CenterLine.js.map +1 -0
- package/dist/LinearGenomeView/components/ExportSvgDialog.js +141 -141
- package/dist/LinearGenomeView/components/ExportSvgDialog.js.map +1 -0
- package/dist/LinearGenomeView/components/Gridlines.d.ts +8 -0
- package/dist/LinearGenomeView/components/Gridlines.js +78 -0
- package/dist/LinearGenomeView/components/Gridlines.js.map +1 -0
- package/dist/LinearGenomeView/components/Header.d.ts +1 -0
- package/dist/LinearGenomeView/components/Header.js +70 -125
- package/dist/LinearGenomeView/components/Header.js.map +1 -0
- package/dist/LinearGenomeView/components/HelpDialog.d.ts +0 -1
- package/dist/LinearGenomeView/components/HelpDialog.js +62 -44
- package/dist/LinearGenomeView/components/HelpDialog.js.map +1 -0
- package/dist/LinearGenomeView/components/ImportForm.d.ts +1 -0
- package/dist/LinearGenomeView/components/ImportForm.js +222 -289
- package/dist/LinearGenomeView/components/ImportForm.js.map +1 -0
- package/dist/LinearGenomeView/components/LinearGenomeView.js +60 -124
- package/dist/LinearGenomeView/components/LinearGenomeView.js.map +1 -0
- package/dist/LinearGenomeView/components/LinearGenomeViewSvg.js +198 -337
- package/dist/LinearGenomeView/components/LinearGenomeViewSvg.js.map +1 -0
- package/dist/LinearGenomeView/components/MiniControls.js +64 -78
- package/dist/LinearGenomeView/components/MiniControls.js.map +1 -0
- package/dist/LinearGenomeView/components/OverviewRubberBand.js +229 -293
- package/dist/LinearGenomeView/components/OverviewRubberBand.js.map +1 -0
- package/dist/LinearGenomeView/components/OverviewScaleBar.d.ts +3 -3
- package/dist/LinearGenomeView/components/OverviewScaleBar.js +275 -370
- package/dist/LinearGenomeView/components/OverviewScaleBar.js.map +1 -0
- package/dist/LinearGenomeView/components/RefNameAutocomplete.d.ts +1 -1
- package/dist/LinearGenomeView/components/RefNameAutocomplete.js +237 -324
- package/dist/LinearGenomeView/components/RefNameAutocomplete.js.map +1 -0
- package/dist/LinearGenomeView/components/RubberBand.js +228 -296
- package/dist/LinearGenomeView/components/RubberBand.js.map +1 -0
- package/dist/LinearGenomeView/components/Ruler.js +45 -90
- package/dist/LinearGenomeView/components/Ruler.js.map +1 -0
- package/dist/LinearGenomeView/components/ScaleBar.d.ts +8 -403
- package/dist/LinearGenomeView/components/ScaleBar.js +121 -172
- package/dist/LinearGenomeView/components/ScaleBar.js.map +1 -0
- package/dist/LinearGenomeView/components/SearchBox.js +155 -166
- package/dist/LinearGenomeView/components/SearchBox.js.map +1 -0
- package/dist/LinearGenomeView/components/SearchResultsDialog.d.ts +0 -1
- package/dist/LinearGenomeView/components/SearchResultsDialog.js +105 -149
- package/dist/LinearGenomeView/components/SearchResultsDialog.js.map +1 -0
- package/dist/LinearGenomeView/components/SequenceDialog.js +219 -272
- package/dist/LinearGenomeView/components/SequenceDialog.js.map +1 -0
- package/dist/LinearGenomeView/components/TrackContainer.d.ts +2 -1
- package/dist/LinearGenomeView/components/TrackContainer.js +113 -158
- package/dist/LinearGenomeView/components/TrackContainer.js.map +1 -0
- package/dist/LinearGenomeView/components/TrackLabel.d.ts +6 -42
- package/dist/LinearGenomeView/components/TrackLabel.js +113 -133
- package/dist/LinearGenomeView/components/TrackLabel.js.map +1 -0
- package/dist/LinearGenomeView/components/TracksContainer.d.ts +1 -1
- package/dist/LinearGenomeView/components/TracksContainer.js +172 -199
- package/dist/LinearGenomeView/components/TracksContainer.js.map +1 -0
- package/dist/LinearGenomeView/components/ZoomControls.js +72 -87
- package/dist/LinearGenomeView/components/ZoomControls.js.map +1 -0
- package/dist/LinearGenomeView/components/util.js +94 -71
- package/dist/LinearGenomeView/components/util.js.map +1 -0
- package/dist/LinearGenomeView/index.d.ts +64 -77
- package/dist/LinearGenomeView/index.js +1035 -1412
- package/dist/LinearGenomeView/index.js.map +1 -0
- package/dist/LinearGenomeView/util.js +76 -83
- package/dist/LinearGenomeView/util.js.map +1 -0
- package/dist/index.d.ts +98 -48
- package/dist/index.js +225 -295
- package/dist/index.js.map +1 -0
- package/esm/BaseLinearDisplay/components/BaseLinearDisplay.d.ts +9 -0
- package/esm/BaseLinearDisplay/components/BaseLinearDisplay.js +68 -0
- package/esm/BaseLinearDisplay/components/BaseLinearDisplay.js.map +1 -0
- package/esm/BaseLinearDisplay/components/Block.d.ts +15 -0
- package/esm/BaseLinearDisplay/components/Block.js +46 -0
- package/esm/BaseLinearDisplay/components/Block.js.map +1 -0
- package/esm/BaseLinearDisplay/components/LinearBlocks.d.ts +22 -0
- package/esm/BaseLinearDisplay/components/LinearBlocks.js +62 -0
- package/esm/BaseLinearDisplay/components/LinearBlocks.js.map +1 -0
- package/esm/BaseLinearDisplay/components/ServerSideRenderedBlockContent.d.ts +4 -0
- package/esm/BaseLinearDisplay/components/ServerSideRenderedBlockContent.js +114 -0
- package/esm/BaseLinearDisplay/components/ServerSideRenderedBlockContent.js.map +1 -0
- package/esm/BaseLinearDisplay/components/Tooltip.d.ts +8 -0
- package/esm/BaseLinearDisplay/components/Tooltip.js +64 -0
- package/esm/BaseLinearDisplay/components/Tooltip.js.map +1 -0
- package/esm/BaseLinearDisplay/index.d.ts +5 -0
- package/esm/BaseLinearDisplay/index.js +4 -0
- package/esm/BaseLinearDisplay/index.js.map +1 -0
- package/esm/BaseLinearDisplay/models/BaseLinearDisplayModel.d.ts +232 -0
- package/esm/BaseLinearDisplay/models/BaseLinearDisplayModel.js +541 -0
- package/esm/BaseLinearDisplay/models/BaseLinearDisplayModel.js.map +1 -0
- package/esm/BaseLinearDisplay/models/baseLinearDisplayConfigSchema.d.ts +1 -0
- package/esm/BaseLinearDisplay/models/baseLinearDisplayConfigSchema.js +14 -0
- package/esm/BaseLinearDisplay/models/baseLinearDisplayConfigSchema.js.map +1 -0
- package/esm/BaseLinearDisplay/models/serverSideRenderedBlock.d.ts +96 -0
- package/esm/BaseLinearDisplay/models/serverSideRenderedBlock.js +225 -0
- package/esm/BaseLinearDisplay/models/serverSideRenderedBlock.js.map +1 -0
- package/esm/LinearBareDisplay/configSchema.d.ts +2 -0
- package/esm/LinearBareDisplay/configSchema.js +9 -0
- package/esm/LinearBareDisplay/configSchema.js.map +1 -0
- package/esm/LinearBareDisplay/index.d.ts +2 -0
- package/esm/LinearBareDisplay/index.js +3 -0
- package/esm/LinearBareDisplay/index.js.map +1 -0
- package/esm/LinearBareDisplay/model.d.ts +194 -0
- package/esm/LinearBareDisplay/model.js +28 -0
- package/esm/LinearBareDisplay/model.js.map +1 -0
- package/esm/LinearBasicDisplay/components/SetMaxHeight.d.ts +10 -0
- package/esm/LinearBasicDisplay/components/SetMaxHeight.js +40 -0
- package/esm/LinearBasicDisplay/components/SetMaxHeight.js.map +1 -0
- package/esm/LinearBasicDisplay/configSchema.d.ts +2 -0
- package/esm/LinearBasicDisplay/configSchema.js +14 -0
- package/esm/LinearBasicDisplay/configSchema.js.map +1 -0
- package/esm/LinearBasicDisplay/index.d.ts +2 -0
- package/esm/LinearBasicDisplay/index.js +3 -0
- package/esm/LinearBasicDisplay/index.js.map +1 -0
- package/esm/LinearBasicDisplay/model.d.ts +218 -0
- package/esm/LinearBasicDisplay/model.js +127 -0
- package/esm/LinearBasicDisplay/model.js.map +1 -0
- package/esm/LinearGenomeView/components/CenterLine.d.ts +8 -0
- package/esm/LinearGenomeView/components/CenterLine.js +40 -0
- package/esm/LinearGenomeView/components/CenterLine.js.map +1 -0
- package/esm/LinearGenomeView/components/ExportSvgDialog.d.ts +6 -0
- package/esm/LinearGenomeView/components/ExportSvgDialog.js +52 -0
- package/esm/LinearGenomeView/components/ExportSvgDialog.js.map +1 -0
- package/esm/LinearGenomeView/components/Gridlines.d.ts +8 -0
- package/esm/LinearGenomeView/components/Gridlines.js +71 -0
- package/esm/LinearGenomeView/components/Gridlines.js.map +1 -0
- package/esm/LinearGenomeView/components/Header.d.ts +7 -0
- package/esm/LinearGenomeView/components/Header.js +81 -0
- package/esm/LinearGenomeView/components/Header.js.map +1 -0
- package/esm/LinearGenomeView/components/HelpDialog.d.ts +4 -0
- package/esm/LinearGenomeView/components/HelpDialog.js +58 -0
- package/esm/LinearGenomeView/components/HelpDialog.js.map +1 -0
- package/esm/LinearGenomeView/components/ImportForm.d.ts +7 -0
- package/esm/LinearGenomeView/components/ImportForm.js +141 -0
- package/esm/LinearGenomeView/components/ImportForm.js.map +1 -0
- package/esm/LinearGenomeView/components/LinearGenomeView.d.ts +7 -0
- package/esm/LinearGenomeView/components/LinearGenomeView.js +63 -0
- package/esm/LinearGenomeView/components/LinearGenomeView.js.map +1 -0
- package/esm/LinearGenomeView/components/LinearGenomeViewSvg.d.ts +4 -0
- package/esm/LinearGenomeView/components/LinearGenomeViewSvg.js +132 -0
- package/esm/LinearGenomeView/components/LinearGenomeViewSvg.js.map +1 -0
- package/esm/LinearGenomeView/components/MiniControls.d.ts +6 -0
- package/esm/LinearGenomeView/components/MiniControls.js +25 -0
- package/esm/LinearGenomeView/components/MiniControls.js.map +1 -0
- package/esm/LinearGenomeView/components/OverviewRubberBand.d.ts +22 -0
- package/esm/LinearGenomeView/components/OverviewRubberBand.js +197 -0
- package/esm/LinearGenomeView/components/OverviewRubberBand.js.map +1 -0
- package/esm/LinearGenomeView/components/OverviewScaleBar.d.ts +148 -0
- package/esm/LinearGenomeView/components/OverviewScaleBar.js +287 -0
- package/esm/LinearGenomeView/components/OverviewScaleBar.js.map +1 -0
- package/esm/LinearGenomeView/components/RefNameAutocomplete.d.ts +22 -0
- package/esm/LinearGenomeView/components/RefNameAutocomplete.js +136 -0
- package/esm/LinearGenomeView/components/RefNameAutocomplete.js.map +1 -0
- package/esm/LinearGenomeView/components/RubberBand.d.ts +9 -0
- package/esm/LinearGenomeView/components/RubberBand.js +197 -0
- package/esm/LinearGenomeView/components/RubberBand.js.map +1 -0
- package/esm/LinearGenomeView/components/Ruler.d.ts +27 -0
- package/esm/LinearGenomeView/components/Ruler.js +50 -0
- package/esm/LinearGenomeView/components/Ruler.js.map +1 -0
- package/esm/LinearGenomeView/components/ScaleBar.d.ts +10 -0
- package/esm/LinearGenomeView/components/ScaleBar.js +112 -0
- package/esm/LinearGenomeView/components/ScaleBar.js.map +1 -0
- package/esm/LinearGenomeView/components/SearchBox.d.ts +8 -0
- package/esm/LinearGenomeView/components/SearchBox.js +94 -0
- package/esm/LinearGenomeView/components/SearchBox.js.map +1 -0
- package/esm/LinearGenomeView/components/SearchResultsDialog.d.ts +7 -0
- package/esm/LinearGenomeView/components/SearchResultsDialog.js +107 -0
- package/esm/LinearGenomeView/components/SearchResultsDialog.js.map +1 -0
- package/esm/LinearGenomeView/components/SequenceDialog.d.ts +8 -0
- package/esm/LinearGenomeView/components/SequenceDialog.js +147 -0
- package/esm/LinearGenomeView/components/SequenceDialog.js.map +1 -0
- package/esm/LinearGenomeView/components/TrackContainer.d.ts +10 -0
- package/esm/LinearGenomeView/components/TrackContainer.js +104 -0
- package/esm/LinearGenomeView/components/TrackContainer.js.map +1 -0
- package/esm/LinearGenomeView/components/TrackLabel.d.ts +8 -0
- package/esm/LinearGenomeView/components/TrackLabel.js +88 -0
- package/esm/LinearGenomeView/components/TrackLabel.js.map +1 -0
- package/{dist/LinearGenomeView/components/VerticalGuides.d.ts → esm/LinearGenomeView/components/TracksContainer.d.ts} +4 -3
- package/esm/LinearGenomeView/components/TracksContainer.js +142 -0
- package/esm/LinearGenomeView/components/TracksContainer.js.map +1 -0
- package/esm/LinearGenomeView/components/ZoomControls.d.ts +7 -0
- package/esm/LinearGenomeView/components/ZoomControls.js +32 -0
- package/esm/LinearGenomeView/components/ZoomControls.js.map +1 -0
- package/esm/LinearGenomeView/components/util.d.ts +14 -0
- package/esm/LinearGenomeView/components/util.js +17 -0
- package/esm/LinearGenomeView/components/util.js.map +1 -0
- package/esm/LinearGenomeView/index.d.ts +275 -0
- package/esm/LinearGenomeView/index.js +978 -0
- package/esm/LinearGenomeView/index.js.map +1 -0
- package/esm/LinearGenomeView/util.d.ts +14 -0
- package/esm/LinearGenomeView/util.js +62 -0
- package/esm/LinearGenomeView/util.js.map +1 -0
- package/esm/index.d.ts +615 -0
- package/esm/index.js +127 -0
- package/esm/index.js.map +1 -0
- package/package.json +22 -15
- package/src/BaseLinearDisplay/components/BaseLinearDisplay.tsx +4 -4
- package/src/BaseLinearDisplay/components/Block.tsx +5 -5
- package/src/BaseLinearDisplay/components/LinearBlocks.tsx +4 -4
- package/src/BaseLinearDisplay/components/ServerSideRenderedBlockContent.tsx +9 -9
- package/src/BaseLinearDisplay/components/Tooltip.tsx +14 -4
- package/src/BaseLinearDisplay/models/BaseLinearDisplayModel.tsx +6 -4
- package/src/BaseLinearDisplay/models/serverSideRenderedBlock.ts +1 -1
- package/src/LinearBasicDisplay/components/SetMaxHeight.tsx +10 -7
- package/src/LinearBasicDisplay/model.ts +19 -11
- package/src/LinearGenomeView/components/CenterLine.tsx +6 -11
- package/src/LinearGenomeView/components/ExportSvgDialog.tsx +5 -5
- package/src/LinearGenomeView/components/{VerticalGuides.tsx → Gridlines.tsx} +9 -11
- package/src/LinearGenomeView/components/Header.tsx +10 -15
- package/src/LinearGenomeView/components/HelpDialog.tsx +5 -5
- package/src/LinearGenomeView/components/ImportForm.tsx +6 -12
- package/src/LinearGenomeView/components/LinearGenomeView.test.js +16 -6
- package/src/LinearGenomeView/components/LinearGenomeView.tsx +6 -9
- package/src/LinearGenomeView/components/MiniControls.tsx +29 -40
- package/src/LinearGenomeView/components/OverviewRubberBand.tsx +20 -29
- package/src/LinearGenomeView/components/OverviewScaleBar.tsx +61 -59
- package/src/LinearGenomeView/components/RefNameAutocomplete.tsx +13 -44
- package/src/LinearGenomeView/components/RubberBand.tsx +12 -18
- package/src/LinearGenomeView/components/Ruler.tsx +5 -11
- package/src/LinearGenomeView/components/ScaleBar.tsx +23 -27
- package/src/LinearGenomeView/components/SearchBox.tsx +4 -3
- package/src/LinearGenomeView/components/SearchResultsDialog.tsx +7 -6
- package/src/LinearGenomeView/components/SequenceDialog.tsx +10 -10
- package/src/LinearGenomeView/components/TrackContainer.tsx +29 -39
- package/src/LinearGenomeView/components/TrackLabel.tsx +76 -79
- package/src/LinearGenomeView/components/TracksContainer.tsx +10 -15
- package/src/LinearGenomeView/components/ZoomControls.tsx +12 -13
- package/src/LinearGenomeView/components/__snapshots__/LinearGenomeView.test.js.snap +500 -550
- package/src/LinearGenomeView/index.test.ts +15 -36
- package/src/LinearGenomeView/index.tsx +390 -564
- package/src/index.ts +1 -1
- package/dist/LinearBareDisplay/index.test.js +0 -33
- package/dist/LinearGenomeView/components/LinearGenomeView.test.js +0 -234
- package/dist/LinearGenomeView/components/ScaleBar.test.js +0 -180
- package/dist/LinearGenomeView/components/VerticalGuides.js +0 -116
- package/dist/LinearGenomeView/index.test.js +0 -1187
- package/dist/LinearGenomeView/util.test.js +0 -78
|
@@ -5,20 +5,17 @@ import BaseResult, {
|
|
|
5
5
|
RefSequenceResult,
|
|
6
6
|
} from '@jbrowse/core/TextSearch/BaseResults'
|
|
7
7
|
import {
|
|
8
|
+
Autocomplete,
|
|
8
9
|
CircularProgress,
|
|
9
10
|
IconButton,
|
|
10
11
|
InputAdornment,
|
|
11
|
-
Popper,
|
|
12
|
-
PopperProps,
|
|
13
12
|
TextField,
|
|
14
13
|
TextFieldProps as TFP,
|
|
15
|
-
|
|
16
|
-
} from '@material-ui/core'
|
|
14
|
+
} from '@mui/material'
|
|
17
15
|
|
|
18
16
|
// icons
|
|
19
|
-
import SearchIcon from '@
|
|
20
|
-
import
|
|
21
|
-
import HelpIcon from '@material-ui/icons/Help'
|
|
17
|
+
import SearchIcon from '@mui/icons-material/Search'
|
|
18
|
+
import HelpIcon from '@mui/icons-material/Help'
|
|
22
19
|
|
|
23
20
|
// locals
|
|
24
21
|
import { LinearGenomeViewModel } from '..'
|
|
@@ -45,25 +42,6 @@ function filterOptions(options: Option[], searchQuery: string) {
|
|
|
45
42
|
})
|
|
46
43
|
}
|
|
47
44
|
|
|
48
|
-
// MyPopper used to expand search results box wider if needed
|
|
49
|
-
// xref https://stackoverflow.com/a/63583835/2129219
|
|
50
|
-
const MyPopper = function (
|
|
51
|
-
props: PopperProps & { style?: { width?: unknown } },
|
|
52
|
-
) {
|
|
53
|
-
const { style } = props
|
|
54
|
-
return (
|
|
55
|
-
<Popper
|
|
56
|
-
{...props}
|
|
57
|
-
style={{
|
|
58
|
-
width: 'fit-content',
|
|
59
|
-
minWidth: Math.min(+(style?.width || 0), 200),
|
|
60
|
-
background: 'white',
|
|
61
|
-
}}
|
|
62
|
-
placement="bottom-start"
|
|
63
|
-
/>
|
|
64
|
-
)
|
|
65
|
-
}
|
|
66
|
-
|
|
67
45
|
function RefNameAutocomplete({
|
|
68
46
|
model,
|
|
69
47
|
onSelect,
|
|
@@ -164,7 +142,6 @@ function RefNameAutocomplete({
|
|
|
164
142
|
data-testid="autocomplete"
|
|
165
143
|
disableListWrap
|
|
166
144
|
disableClearable
|
|
167
|
-
PopperComponent={MyPopper}
|
|
168
145
|
disabled={!assemblyName}
|
|
169
146
|
freeSolo
|
|
170
147
|
includeInputInList
|
|
@@ -226,11 +203,11 @@ function RefNameAutocomplete({
|
|
|
226
203
|
const { helperText, InputProps = {} } = TextFieldProps
|
|
227
204
|
return (
|
|
228
205
|
<TextField
|
|
229
|
-
onBlur={() =>
|
|
206
|
+
onBlur={() =>
|
|
230
207
|
// this is used to restore a refName or the non-user-typed input
|
|
231
208
|
// to the box on blurring
|
|
232
209
|
setInputValue(inputBoxVal)
|
|
233
|
-
}
|
|
210
|
+
}
|
|
234
211
|
{...params}
|
|
235
212
|
{...TextFieldProps}
|
|
236
213
|
helperText={helperText}
|
|
@@ -244,12 +221,13 @@ function RefNameAutocomplete({
|
|
|
244
221
|
<CircularProgress color="inherit" size={20} />
|
|
245
222
|
) : (
|
|
246
223
|
<InputAdornment position="end" style={{ marginRight: 7 }}>
|
|
247
|
-
<SearchIcon />
|
|
224
|
+
<SearchIcon fontSize="small" />
|
|
248
225
|
{showHelp ? (
|
|
249
226
|
<IconButton
|
|
250
227
|
onClick={() => setHelpDialogDisplayed(true)}
|
|
228
|
+
size="small"
|
|
251
229
|
>
|
|
252
|
-
<HelpIcon />
|
|
230
|
+
<HelpIcon fontSize="small" />
|
|
253
231
|
</IconButton>
|
|
254
232
|
) : null}
|
|
255
233
|
</InputAdornment>
|
|
@@ -259,23 +237,14 @@ function RefNameAutocomplete({
|
|
|
259
237
|
),
|
|
260
238
|
}}
|
|
261
239
|
placeholder="Search for location"
|
|
262
|
-
onChange={e =>
|
|
263
|
-
setCurrentSearch(e.target.value)
|
|
264
|
-
}}
|
|
240
|
+
onChange={e => setCurrentSearch(e.target.value)}
|
|
265
241
|
/>
|
|
266
242
|
)
|
|
267
243
|
}}
|
|
268
|
-
renderOption={option => {
|
|
269
|
-
const { result } = option
|
|
270
|
-
const component = result.getRenderingComponent()
|
|
271
|
-
if (component && React.isValidElement(component)) {
|
|
272
|
-
return component
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
return <Typography noWrap>{result.getDisplayString()}</Typography>
|
|
276
|
-
}}
|
|
277
244
|
getOptionLabel={option =>
|
|
278
|
-
(typeof option === 'string'
|
|
245
|
+
(typeof option === 'string'
|
|
246
|
+
? option
|
|
247
|
+
: option.result.getDisplayString()) || ''
|
|
279
248
|
}
|
|
280
249
|
/>
|
|
281
250
|
{isHelpDialogDisplayed ? (
|
|
@@ -1,22 +1,19 @@
|
|
|
1
1
|
import React, { useRef, useEffect, useState } from 'react'
|
|
2
2
|
import { observer } from 'mobx-react'
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
Tooltip,
|
|
6
|
-
Typography,
|
|
7
|
-
makeStyles,
|
|
8
|
-
alpha,
|
|
9
|
-
} from '@material-ui/core'
|
|
3
|
+
import { Popover, Tooltip, Typography, alpha } from '@mui/material'
|
|
4
|
+
import { makeStyles } from 'tss-react/mui'
|
|
10
5
|
import { stringify } from '@jbrowse/core/util'
|
|
11
6
|
import { Menu } from '@jbrowse/core/ui'
|
|
12
7
|
import { LinearGenomeViewModel } from '..'
|
|
13
8
|
|
|
14
9
|
type LGV = LinearGenomeViewModel
|
|
15
10
|
|
|
16
|
-
const useStyles = makeStyles(theme => {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
11
|
+
const useStyles = makeStyles()(theme => {
|
|
12
|
+
// @ts-ignore
|
|
13
|
+
const { primary, tertiary } = theme.palette
|
|
14
|
+
const background = tertiary
|
|
15
|
+
? alpha(tertiary.main, 0.7)
|
|
16
|
+
: alpha(primary.main, 0.7)
|
|
20
17
|
return {
|
|
21
18
|
rubberBand: {
|
|
22
19
|
height: '100%',
|
|
@@ -32,9 +29,7 @@ const useStyles = makeStyles(theme => {
|
|
|
32
29
|
minHeight: 8,
|
|
33
30
|
},
|
|
34
31
|
rubberBandText: {
|
|
35
|
-
color:
|
|
36
|
-
? theme.palette.tertiary.contrastText
|
|
37
|
-
: theme.palette.primary.contrastText,
|
|
32
|
+
color: tertiary ? tertiary.contrastText : primary.contrastText,
|
|
38
33
|
},
|
|
39
34
|
popover: {
|
|
40
35
|
mouseEvents: 'none',
|
|
@@ -56,7 +51,7 @@ const useStyles = makeStyles(theme => {
|
|
|
56
51
|
|
|
57
52
|
const VerticalGuide = observer(
|
|
58
53
|
({ model, coordX }: { model: LGV; coordX: number }) => {
|
|
59
|
-
const classes = useStyles()
|
|
54
|
+
const { classes } = useStyles()
|
|
60
55
|
return (
|
|
61
56
|
<Tooltip
|
|
62
57
|
open
|
|
@@ -93,10 +88,10 @@ function RubberBand({
|
|
|
93
88
|
clientX: number
|
|
94
89
|
clientY: number
|
|
95
90
|
}>()
|
|
96
|
-
const [guideX, setGuideX] = useState<number
|
|
91
|
+
const [guideX, setGuideX] = useState<number>()
|
|
97
92
|
const controlsRef = useRef<HTMLDivElement>(null)
|
|
98
93
|
const rubberBandRef = useRef(null)
|
|
99
|
-
const classes = useStyles()
|
|
94
|
+
const { classes } = useStyles()
|
|
100
95
|
const mouseDragging = startX !== undefined && anchorPosition === undefined
|
|
101
96
|
|
|
102
97
|
const { setOffsets, pxToBp } = model
|
|
@@ -108,7 +103,6 @@ function RubberBand({
|
|
|
108
103
|
}
|
|
109
104
|
let leftPx = startX
|
|
110
105
|
let rightPx = offsetX
|
|
111
|
-
// handles clicking and draging to the left
|
|
112
106
|
if (rightPx < leftPx) {
|
|
113
107
|
;[leftPx, rightPx] = [rightPx, leftPx]
|
|
114
108
|
}
|
|
@@ -1,17 +1,11 @@
|
|
|
1
|
-
import { makeStyles } from '
|
|
1
|
+
import { makeStyles } from 'tss-react/mui'
|
|
2
2
|
import { observer } from 'mobx-react'
|
|
3
3
|
import ReactPropTypes from 'prop-types'
|
|
4
4
|
import React from 'react'
|
|
5
5
|
import { makeTicks } from '../util'
|
|
6
|
+
import { getTickDisplayStr } from '@jbrowse/core/util'
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
if (num < 999) {
|
|
9
|
-
return String(num)
|
|
10
|
-
}
|
|
11
|
-
return `${mathPower(~~(num / 1000))},${`00${~~(num % 1000)}`.substr(-3, 3)}`
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
const useStyles = makeStyles((/* theme */) => ({
|
|
8
|
+
const useStyles = makeStyles()((/* theme */) => ({
|
|
15
9
|
majorTickLabel: {
|
|
16
10
|
fontSize: '11px',
|
|
17
11
|
// fill: theme.palette.text.primary,
|
|
@@ -41,7 +35,7 @@ function Ruler({
|
|
|
41
35
|
major: boolean
|
|
42
36
|
minor: boolean
|
|
43
37
|
}) {
|
|
44
|
-
const classes = useStyles()
|
|
38
|
+
const { classes } = useStyles()
|
|
45
39
|
const ticks = makeTicks(start, end, bpPerPx, major, minor)
|
|
46
40
|
return (
|
|
47
41
|
<>
|
|
@@ -75,7 +69,7 @@ function Ruler({
|
|
|
75
69
|
style={{ fontSize: '11px' }}
|
|
76
70
|
className={classes.majorTickLabel}
|
|
77
71
|
>
|
|
78
|
-
{
|
|
72
|
+
{getTickDisplayStr(tick.base + 1, bpPerPx)}
|
|
79
73
|
</text>
|
|
80
74
|
)
|
|
81
75
|
})}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Paper, Typography
|
|
1
|
+
import { Paper, Typography } from '@mui/material'
|
|
2
|
+
import { makeStyles } from 'tss-react/mui'
|
|
2
3
|
import {
|
|
3
4
|
ContentBlock,
|
|
4
5
|
ElidedBlock,
|
|
5
6
|
InterRegionPaddingBlock,
|
|
6
7
|
} from '@jbrowse/core/util/blockTypes'
|
|
7
|
-
import clsx from 'clsx'
|
|
8
8
|
import { observer } from 'mobx-react'
|
|
9
9
|
import React from 'react'
|
|
10
10
|
import { LinearGenomeViewModel } from '..'
|
|
@@ -18,7 +18,7 @@ import { getTickDisplayStr } from '@jbrowse/core/util'
|
|
|
18
18
|
|
|
19
19
|
type LGV = LinearGenomeViewModel
|
|
20
20
|
|
|
21
|
-
const useStyles = makeStyles(theme => ({
|
|
21
|
+
const useStyles = makeStyles()(theme => ({
|
|
22
22
|
scaleBarContainer: {
|
|
23
23
|
overflow: 'hidden',
|
|
24
24
|
position: 'relative',
|
|
@@ -60,7 +60,7 @@ const useStyles = makeStyles(theme => ({
|
|
|
60
60
|
}))
|
|
61
61
|
|
|
62
62
|
const RenderedRefNameLabels = observer(({ model }: { model: LGV }) => {
|
|
63
|
-
const classes = useStyles()
|
|
63
|
+
const { classes } = useStyles()
|
|
64
64
|
|
|
65
65
|
// find the block that needs pinning to the left side for context
|
|
66
66
|
let lastLeftBlock = 0
|
|
@@ -95,24 +95,22 @@ const RenderedRefNameLabels = observer(({ model }: { model: LGV }) => {
|
|
|
95
95
|
})
|
|
96
96
|
|
|
97
97
|
const RenderedScaleBarLabels = observer(({ model }: { model: LGV }) => {
|
|
98
|
-
const classes = useStyles()
|
|
99
|
-
const { bpPerPx } = model
|
|
98
|
+
const { classes } = useStyles()
|
|
99
|
+
const { bpPerPx, staticBlocks } = model
|
|
100
100
|
|
|
101
101
|
return (
|
|
102
102
|
<>
|
|
103
|
-
{
|
|
103
|
+
{staticBlocks.map((block, index) => {
|
|
104
|
+
const { reversed, start, end, key, widthPx } = block
|
|
104
105
|
if (block instanceof ContentBlock) {
|
|
105
|
-
const { start, end } = block
|
|
106
106
|
const ticks = makeTicks(start, end, bpPerPx, true, false)
|
|
107
107
|
|
|
108
108
|
return (
|
|
109
|
-
<ContentBlockComponent key={`${
|
|
109
|
+
<ContentBlockComponent key={`${key}-${index}`} block={block}>
|
|
110
110
|
{ticks.map(tick => {
|
|
111
111
|
if (tick.type === 'major') {
|
|
112
112
|
const x =
|
|
113
|
-
(
|
|
114
|
-
? block.end - tick.base
|
|
115
|
-
: tick.base - block.start) / model.bpPerPx
|
|
113
|
+
(reversed ? end - tick.base : tick.base - start) / bpPerPx
|
|
116
114
|
const baseNumber = tick.base + 1
|
|
117
115
|
return (
|
|
118
116
|
<div
|
|
@@ -134,13 +132,13 @@ const RenderedScaleBarLabels = observer(({ model }: { model: LGV }) => {
|
|
|
134
132
|
)
|
|
135
133
|
}
|
|
136
134
|
if (block instanceof ElidedBlock) {
|
|
137
|
-
return <ElidedBlockComponent key={
|
|
135
|
+
return <ElidedBlockComponent key={key} width={widthPx} />
|
|
138
136
|
}
|
|
139
137
|
if (block instanceof InterRegionPaddingBlock) {
|
|
140
138
|
return (
|
|
141
139
|
<InterRegionPaddingBlockComponent
|
|
142
|
-
key={
|
|
143
|
-
width={
|
|
140
|
+
key={key}
|
|
141
|
+
width={widthPx}
|
|
144
142
|
style={{ background: 'none' }}
|
|
145
143
|
boundary={block.variant === 'boundary'}
|
|
146
144
|
/>
|
|
@@ -152,23 +150,21 @@ const RenderedScaleBarLabels = observer(({ model }: { model: LGV }) => {
|
|
|
152
150
|
)
|
|
153
151
|
})
|
|
154
152
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
) => {
|
|
165
|
-
const classes = useStyles()
|
|
153
|
+
interface ScaleBarProps {
|
|
154
|
+
model: LGV
|
|
155
|
+
style?: React.CSSProperties
|
|
156
|
+
className?: string
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
const ScaleBar = React.forwardRef<HTMLDivElement, ScaleBarProps>(
|
|
160
|
+
({ model, style, className, ...other }, ref) => {
|
|
161
|
+
const { classes, cx } = useStyles()
|
|
166
162
|
|
|
167
163
|
const offsetLeft = model.staticBlocks.offsetPx - model.offsetPx
|
|
168
164
|
return (
|
|
169
165
|
<Paper
|
|
170
166
|
data-resizer="true" // used to avoid click-and-drag scrolls on trackscontainer
|
|
171
|
-
className={
|
|
167
|
+
className={cx(classes.scaleBarContainer, className)}
|
|
172
168
|
variant="outlined"
|
|
173
169
|
ref={ref}
|
|
174
170
|
style={style}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import { observer } from 'mobx-react'
|
|
3
|
-
import {
|
|
3
|
+
import { useTheme, alpha } from '@mui/material'
|
|
4
|
+
import { makeStyles } from 'tss-react/mui'
|
|
4
5
|
import BaseResult from '@jbrowse/core/TextSearch/BaseResults'
|
|
5
6
|
import { getSession } from '@jbrowse/core/util'
|
|
6
7
|
|
|
@@ -9,7 +10,7 @@ import RefNameAutocomplete from './RefNameAutocomplete'
|
|
|
9
10
|
import { fetchResults } from './util'
|
|
10
11
|
import { LinearGenomeViewModel, SPACING, WIDGET_HEIGHT } from '..'
|
|
11
12
|
|
|
12
|
-
const useStyles = makeStyles(() => ({
|
|
13
|
+
const useStyles = makeStyles()(() => ({
|
|
13
14
|
headerRefName: {
|
|
14
15
|
minWidth: 100,
|
|
15
16
|
},
|
|
@@ -22,7 +23,7 @@ function SearchBox({
|
|
|
22
23
|
showHelp?: boolean
|
|
23
24
|
model: LinearGenomeViewModel
|
|
24
25
|
}) {
|
|
25
|
-
const classes = useStyles()
|
|
26
|
+
const { classes } = useStyles()
|
|
26
27
|
const theme = useTheme()
|
|
27
28
|
const session = getSession(model)
|
|
28
29
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
+
import { makeStyles } from 'tss-react/mui'
|
|
2
3
|
import { getEnv, resolveIdentifier, getRoot } from 'mobx-state-tree'
|
|
3
4
|
import { getSession } from '@jbrowse/core/util'
|
|
4
5
|
import {
|
|
@@ -9,6 +10,7 @@ import {
|
|
|
9
10
|
DialogTitle,
|
|
10
11
|
Divider,
|
|
11
12
|
IconButton,
|
|
13
|
+
Paper,
|
|
12
14
|
Table,
|
|
13
15
|
TableBody,
|
|
14
16
|
TableCell,
|
|
@@ -16,13 +18,11 @@ import {
|
|
|
16
18
|
TableHead,
|
|
17
19
|
TableRow,
|
|
18
20
|
Typography,
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
} from '@material-ui/core'
|
|
22
|
-
import CloseIcon from '@material-ui/icons/Close'
|
|
21
|
+
} from '@mui/material'
|
|
22
|
+
import CloseIcon from '@mui/icons-material/Close'
|
|
23
23
|
import { LinearGenomeViewModel } from '../..'
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
const useStyles = makeStyles()(theme => ({
|
|
26
26
|
dialogContent: {
|
|
27
27
|
width: '80em',
|
|
28
28
|
},
|
|
@@ -43,7 +43,7 @@ export default function SearchResultsDialog({
|
|
|
43
43
|
optAssemblyName?: string
|
|
44
44
|
handleClose: () => void
|
|
45
45
|
}) {
|
|
46
|
-
const classes = useStyles()
|
|
46
|
+
const { classes } = useStyles()
|
|
47
47
|
const session = getSession(model)
|
|
48
48
|
const { pluginManager } = getEnv(session)
|
|
49
49
|
const { assemblyManager } = session
|
|
@@ -108,6 +108,7 @@ export default function SearchResultsDialog({
|
|
|
108
108
|
onClick={() => {
|
|
109
109
|
handleClose()
|
|
110
110
|
}}
|
|
111
|
+
size="large"
|
|
111
112
|
>
|
|
112
113
|
<CloseIcon />
|
|
113
114
|
</IconButton>
|
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
import React, { useEffect, useMemo, useState } from 'react'
|
|
2
|
-
|
|
2
|
+
import { makeStyles } from 'tss-react/mui'
|
|
3
3
|
import {
|
|
4
4
|
Button,
|
|
5
5
|
CircularProgress,
|
|
6
|
+
Container,
|
|
6
7
|
Dialog,
|
|
7
8
|
DialogActions,
|
|
8
9
|
DialogContent,
|
|
9
10
|
DialogTitle,
|
|
10
|
-
Container,
|
|
11
|
-
Typography,
|
|
12
11
|
Divider,
|
|
13
12
|
IconButton,
|
|
14
13
|
TextField,
|
|
15
|
-
|
|
16
|
-
} from '@material
|
|
14
|
+
Typography,
|
|
15
|
+
} from '@mui/material'
|
|
17
16
|
import { observer } from 'mobx-react'
|
|
18
17
|
import { saveAs } from 'file-saver'
|
|
19
18
|
import { Region } from '@jbrowse/core/util/types'
|
|
@@ -25,13 +24,13 @@ import { formatSeqFasta } from '@jbrowse/core/util/formatFastaStrings'
|
|
|
25
24
|
|
|
26
25
|
// icons
|
|
27
26
|
import { ContentCopy as ContentCopyIcon } from '@jbrowse/core/ui/Icons'
|
|
28
|
-
import CloseIcon from '@
|
|
29
|
-
import GetAppIcon from '@
|
|
27
|
+
import CloseIcon from '@mui/icons-material/Close'
|
|
28
|
+
import GetAppIcon from '@mui/icons-material/GetApp'
|
|
30
29
|
|
|
31
30
|
// locals
|
|
32
31
|
import { LinearGenomeViewModel } from '..'
|
|
33
32
|
|
|
34
|
-
const useStyles = makeStyles(theme => ({
|
|
33
|
+
const useStyles = makeStyles()(theme => ({
|
|
35
34
|
loadingMessage: {
|
|
36
35
|
padding: theme.spacing(5),
|
|
37
36
|
},
|
|
@@ -93,7 +92,7 @@ function SequenceDialog({
|
|
|
93
92
|
model: LinearGenomeViewModel
|
|
94
93
|
handleClose: () => void
|
|
95
94
|
}) {
|
|
96
|
-
const classes = useStyles()
|
|
95
|
+
const { classes } = useStyles()
|
|
97
96
|
const session = getSession(model)
|
|
98
97
|
const [error, setError] = useState<unknown>()
|
|
99
98
|
const [sequence, setSequence] = useState<string>()
|
|
@@ -181,6 +180,7 @@ function SequenceDialog({
|
|
|
181
180
|
handleClose()
|
|
182
181
|
model.setOffsets(undefined, undefined)
|
|
183
182
|
}}
|
|
183
|
+
size="large"
|
|
184
184
|
>
|
|
185
185
|
<CloseIcon />
|
|
186
186
|
</IconButton>
|
|
@@ -248,7 +248,7 @@ function SequenceDialog({
|
|
|
248
248
|
>
|
|
249
249
|
Download FASTA
|
|
250
250
|
</Button>
|
|
251
|
-
<Button onClick={handleClose}
|
|
251
|
+
<Button onClick={handleClose} variant="contained">
|
|
252
252
|
Close
|
|
253
253
|
</Button>
|
|
254
254
|
</DialogActions>
|
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
import React, { useEffect, useRef } from 'react'
|
|
2
|
+
import { Paper } from '@mui/material'
|
|
3
|
+
import { makeStyles } from 'tss-react/mui'
|
|
2
4
|
import { observer } from 'mobx-react'
|
|
3
5
|
import { isAlive } from 'mobx-state-tree'
|
|
4
6
|
import { BaseTrackModel } from '@jbrowse/core/pluggableElementTypes/models'
|
|
5
7
|
import { getConf } from '@jbrowse/core/configuration'
|
|
6
8
|
import { ResizeHandle } from '@jbrowse/core/ui'
|
|
7
9
|
import { useDebouncedCallback } from '@jbrowse/core/util'
|
|
8
|
-
import clsx from 'clsx'
|
|
9
|
-
import Paper from '@material-ui/core/Paper'
|
|
10
|
-
import { makeStyles } from '@material-ui/core/styles'
|
|
11
10
|
|
|
12
|
-
|
|
11
|
+
// locals
|
|
12
|
+
import { LinearGenomeViewModel } from '..'
|
|
13
13
|
import TrackLabel from './TrackLabel'
|
|
14
14
|
|
|
15
|
-
const useStyles = makeStyles(
|
|
16
|
-
root: {
|
|
15
|
+
const useStyles = makeStyles()({
|
|
16
|
+
root: {
|
|
17
|
+
marginTop: 2,
|
|
18
|
+
},
|
|
17
19
|
resizeHandle: {
|
|
18
|
-
height:
|
|
20
|
+
height: 3,
|
|
19
21
|
boxSizing: 'border-box',
|
|
20
22
|
position: 'relative',
|
|
21
23
|
zIndex: 2,
|
|
@@ -27,7 +29,6 @@ const useStyles = makeStyles(theme => ({
|
|
|
27
29
|
left: 0,
|
|
28
30
|
width: '100%',
|
|
29
31
|
zIndex: 3,
|
|
30
|
-
borderRadius: theme.shape.borderRadius,
|
|
31
32
|
},
|
|
32
33
|
trackLabel: {
|
|
33
34
|
zIndex: 3,
|
|
@@ -42,7 +43,7 @@ const useStyles = makeStyles(theme => ({
|
|
|
42
43
|
height: '100%',
|
|
43
44
|
width: '100%',
|
|
44
45
|
},
|
|
45
|
-
|
|
46
|
+
trackLabelOffset: {
|
|
46
47
|
position: 'relative',
|
|
47
48
|
display: 'inline-block',
|
|
48
49
|
},
|
|
@@ -57,22 +58,22 @@ const useStyles = makeStyles(theme => ({
|
|
|
57
58
|
background: 'none',
|
|
58
59
|
zIndex: 2,
|
|
59
60
|
},
|
|
60
|
-
})
|
|
61
|
+
})
|
|
61
62
|
|
|
62
63
|
type LGV = LinearGenomeViewModel
|
|
63
64
|
|
|
64
65
|
const TrackContainerLabel = observer(
|
|
65
66
|
({ model, view }: { model: BaseTrackModel; view: LGV }) => {
|
|
66
|
-
const classes = useStyles()
|
|
67
|
+
const { classes, cx } = useStyles()
|
|
68
|
+
const display = model.displays[0]
|
|
69
|
+
const { trackLabel, trackLabelOverlap, trackLabelOffset } = classes
|
|
67
70
|
const labelStyle =
|
|
68
|
-
view.trackLabels
|
|
69
|
-
?
|
|
70
|
-
:
|
|
71
|
+
view.trackLabels !== 'overlapping' || display.prefersOffset
|
|
72
|
+
? trackLabelOffset
|
|
73
|
+
: trackLabelOverlap
|
|
74
|
+
|
|
71
75
|
return view.trackLabels !== 'hidden' ? (
|
|
72
|
-
<TrackLabel
|
|
73
|
-
track={model}
|
|
74
|
-
className={clsx(classes.trackLabel, labelStyle)}
|
|
75
|
-
/>
|
|
76
|
+
<TrackLabel track={model} className={cx(trackLabel, labelStyle)} />
|
|
76
77
|
) : null
|
|
77
78
|
},
|
|
78
79
|
)
|
|
@@ -81,16 +82,21 @@ function TrackContainer({
|
|
|
81
82
|
model,
|
|
82
83
|
track,
|
|
83
84
|
}: {
|
|
84
|
-
model:
|
|
85
|
+
model: LGV
|
|
85
86
|
track: BaseTrackModel
|
|
86
87
|
}) {
|
|
87
|
-
const classes = useStyles()
|
|
88
|
+
const { classes } = useStyles()
|
|
88
89
|
const display = track.displays[0]
|
|
89
90
|
const { horizontalScroll, draggingTrackId, moveTrack } = model
|
|
90
|
-
const { height } = display
|
|
91
|
+
const { height, RenderingComponent, DisplayBlurb } = display
|
|
91
92
|
const trackId = getConf(track, 'trackId')
|
|
92
93
|
const ref = useRef(null)
|
|
93
|
-
|
|
94
|
+
const dimmed = draggingTrackId !== undefined && draggingTrackId !== display.id
|
|
95
|
+
const debouncedOnDragEnter = useDebouncedCallback(() => {
|
|
96
|
+
if (isAlive(display) && dimmed) {
|
|
97
|
+
moveTrack(draggingTrackId, track.id)
|
|
98
|
+
}
|
|
99
|
+
}, 100)
|
|
94
100
|
useEffect(() => {
|
|
95
101
|
if (ref.current) {
|
|
96
102
|
model.trackRefs[trackId] = ref.current
|
|
@@ -99,18 +105,6 @@ function TrackContainer({
|
|
|
99
105
|
delete model.trackRefs[trackId]
|
|
100
106
|
}
|
|
101
107
|
}, [model.trackRefs, trackId])
|
|
102
|
-
function onDragEnter() {
|
|
103
|
-
if (
|
|
104
|
-
draggingTrackId !== undefined &&
|
|
105
|
-
isAlive(display) &&
|
|
106
|
-
draggingTrackId !== display.id
|
|
107
|
-
) {
|
|
108
|
-
moveTrack(draggingTrackId, track.id)
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
const debouncedOnDragEnter = useDebouncedCallback(onDragEnter, 100)
|
|
112
|
-
const { RenderingComponent, DisplayBlurb } = display
|
|
113
|
-
const dimmed = draggingTrackId !== undefined && draggingTrackId !== display.id
|
|
114
108
|
|
|
115
109
|
return (
|
|
116
110
|
<Paper className={classes.root} variant="outlined">
|
|
@@ -118,13 +112,9 @@ function TrackContainer({
|
|
|
118
112
|
<div
|
|
119
113
|
className={classes.trackRenderingContainer}
|
|
120
114
|
style={{ height }}
|
|
121
|
-
onScroll={event =>
|
|
122
|
-
const target = event.target as HTMLDivElement
|
|
123
|
-
display.setScrollTop(target.scrollTop)
|
|
124
|
-
}}
|
|
115
|
+
onScroll={event => display.setScrollTop(event.currentTarget.scrollTop)}
|
|
125
116
|
onDragEnter={debouncedOnDragEnter}
|
|
126
117
|
data-testid={`trackRenderingContainer-${model.id}-${trackId}`}
|
|
127
|
-
role="presentation"
|
|
128
118
|
>
|
|
129
119
|
<div
|
|
130
120
|
ref={ref}
|