@jbrowse/plugin-linear-genome-view 1.6.5 → 1.6.8
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/models/baseLinearDisplayConfigSchema.d.ts +1 -1
- package/dist/LinearBareDisplay/configSchema.d.ts +1 -1
- package/dist/LinearBareDisplay/model.d.ts +7 -7
- package/dist/LinearBasicDisplay/configSchema.d.ts +1 -1
- package/dist/LinearBasicDisplay/model.d.ts +7 -7
- package/dist/LinearGenomeView/components/OverviewScaleBar.d.ts +6 -6
- package/dist/LinearGenomeView/components/TrackContainer.d.ts +1 -1
- package/dist/index.d.ts +22 -22
- package/dist/plugin-linear-genome-view.cjs.development.js +157 -242
- package/dist/plugin-linear-genome-view.cjs.development.js.map +1 -1
- package/dist/plugin-linear-genome-view.cjs.production.min.js +1 -1
- package/dist/plugin-linear-genome-view.cjs.production.min.js.map +1 -1
- package/dist/plugin-linear-genome-view.esm.js +158 -243
- package/dist/plugin-linear-genome-view.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/BaseLinearDisplay/components/BaseLinearDisplay.tsx +10 -13
- package/src/BaseLinearDisplay/models/BaseLinearDisplayModel.tsx +6 -1
- package/src/LinearBasicDisplay/components/SetMaxHeight.tsx +21 -12
- package/src/LinearBasicDisplay/model.ts +1 -1
- package/src/LinearGenomeView/components/HelpDialog.tsx +14 -1
- package/src/LinearGenomeView/components/LinearGenomeViewSvg.tsx +1 -13
- package/src/LinearGenomeView/components/OverviewScaleBar.tsx +7 -3
- package/src/LinearGenomeView/components/TrackContainer.tsx +34 -30
- package/src/LinearGenomeView/components/TracksContainer.tsx +0 -1
- package/src/LinearGenomeView/components/__snapshots__/LinearGenomeView.test.js.snap +32 -61
- package/src/LinearGenomeView/index.test.ts +44 -42
- package/src/LinearGenomeView/index.tsx +55 -131
- package/src/LinearGenomeView/volvoxDisplayedRegions.json +16 -0
- package/dist/LinearGenomeView/components/ReturnToImportFormDialog.d.ts +0 -9
- package/src/LinearGenomeView/components/ReturnToImportFormDialog.tsx +0 -83
|
@@ -6,16 +6,16 @@ import TrackType from '@jbrowse/core/pluggableElementTypes/TrackType';
|
|
|
6
6
|
import DisplayType from '@jbrowse/core/pluggableElementTypes/DisplayType';
|
|
7
7
|
import ViewType from '@jbrowse/core/pluggableElementTypes/ViewType';
|
|
8
8
|
import Plugin from '@jbrowse/core/Plugin';
|
|
9
|
-
import { getContainingView, getContainingDisplay, makeAbortableReaction, assembleLocString, getSession, isSessionModelWithWidgets, isSelectionContainer, isAbortException, stringify, useDebounce, measureText, useDebouncedCallback, viewBpToPx, clamp, isViewContainer, parseLocString, findLastIndex, springAnimate, isAbstractMenuManager } from '@jbrowse/core/util';
|
|
9
|
+
import { getContainingView, getContainingDisplay, makeAbortableReaction, assembleLocString, getSession, isSessionModelWithWidgets, isSelectionContainer, isAbortException, stringify, getBpDisplayStr, useDebounce, measureText, useDebouncedCallback, viewBpToPx, clamp, isViewContainer, parseLocString, findLastIndex, springAnimate, isAbstractMenuManager } from '@jbrowse/core/util';
|
|
10
10
|
import LineStyleIcon from '@material-ui/icons/LineStyle';
|
|
11
|
-
import { useTheme, makeStyles as makeStyles$1, alpha, Portal, Typography as Typography$1, Button as Button$1, Popover, Tooltip as Tooltip$1, TextField, Popper, CircularProgress, InputAdornment, IconButton, Dialog, DialogTitle, DialogContent, FormControlLabel, Checkbox, DialogActions,
|
|
11
|
+
import { useTheme, makeStyles as makeStyles$1, alpha, Portal, Typography as Typography$1, Button as Button$1, Popover, Tooltip as Tooltip$1, TextField, Popper, CircularProgress, InputAdornment, IconButton, Dialog, DialogTitle, DialogContent, FormControlLabel, Checkbox, DialogActions, FormGroup, Paper, Container, Grid, Divider, TableContainer, Table, TableHead, TableRow, TableCell, TableBody } from '@material-ui/core';
|
|
12
12
|
import CompositeMap from '@jbrowse/core/util/compositeMap';
|
|
13
13
|
import { isFeature } from '@jbrowse/core/util/simpleFeature';
|
|
14
14
|
import { getParentRenderProps, getTrackAssemblyNames, getRpcSessionId } from '@jbrowse/core/util/tracks';
|
|
15
15
|
import { getParent, types, cast, isAlive, addDisposer, getEnv, resolveIdentifier, getRoot, getSnapshot } from 'mobx-state-tree';
|
|
16
16
|
import MenuOpenIcon from '@material-ui/icons/MenuOpen';
|
|
17
|
-
import { Menu, ResizeHandle } from '@jbrowse/core/ui';
|
|
18
17
|
import { observer, PropTypes } from 'mobx-react';
|
|
18
|
+
import { Menu, ResizeHandle, ReturnToImportFormDialog } from '@jbrowse/core/ui';
|
|
19
19
|
import { usePopper } from 'react-popper';
|
|
20
20
|
import { makeStyles } from '@material-ui/core/styles';
|
|
21
21
|
import { ContentBlock as ContentBlock$1, ElidedBlock as ElidedBlock$1, InterRegionPaddingBlock as InterRegionPaddingBlock$1 } from '@jbrowse/core/util/blockTypes';
|
|
@@ -1341,7 +1341,7 @@ var useStyles$2 = /*#__PURE__*/makeStyles$1(function (theme) {
|
|
|
1341
1341
|
color: theme.palette.common.white,
|
|
1342
1342
|
fontFamily: theme.typography.fontFamily,
|
|
1343
1343
|
padding: '4px 8px',
|
|
1344
|
-
fontSize: theme.typography.pxToRem(
|
|
1344
|
+
fontSize: theme.typography.pxToRem(12),
|
|
1345
1345
|
lineHeight: "".concat(round(14 / 10), "em"),
|
|
1346
1346
|
maxWidth: 300,
|
|
1347
1347
|
wordWrap: 'break-word'
|
|
@@ -1459,14 +1459,17 @@ var BaseLinearDisplay = /*#__PURE__*/observer(function (props) {
|
|
|
1459
1459
|
}
|
|
1460
1460
|
},
|
|
1461
1461
|
onMouseMove: function onMouseMove(event) {
|
|
1462
|
-
if (ref.current) {
|
|
1463
|
-
|
|
1464
|
-
setOffsetMouseCoord([event.clientX - rect.left, event.clientY - rect.top]);
|
|
1465
|
-
setClientMouseCoord([event.clientX, event.clientY]);
|
|
1466
|
-
setClientRect(rect);
|
|
1462
|
+
if (!ref.current) {
|
|
1463
|
+
return;
|
|
1467
1464
|
}
|
|
1468
|
-
|
|
1469
|
-
|
|
1465
|
+
|
|
1466
|
+
var rect = ref.current.getBoundingClientRect();
|
|
1467
|
+
var left = rect.left,
|
|
1468
|
+
top = rect.top;
|
|
1469
|
+
setOffsetMouseCoord([event.clientX - left, event.clientY - top]);
|
|
1470
|
+
setClientMouseCoord([event.clientX, event.clientY]);
|
|
1471
|
+
setClientRect(rect);
|
|
1472
|
+
}
|
|
1470
1473
|
}, DisplayMessageComponent ? /*#__PURE__*/React.createElement(DisplayMessageComponent, {
|
|
1471
1474
|
model: model
|
|
1472
1475
|
}) : /*#__PURE__*/React.createElement(LinearBlocks$1, Object.assign({}, props)), children, /*#__PURE__*/React.createElement(TooltipComponent, {
|
|
@@ -2386,9 +2389,10 @@ var BaseLinearDisplay$1 = /*#__PURE__*/types.compose('BaseLinearDisplay', BaseDi
|
|
|
2386
2389
|
case 0:
|
|
2387
2390
|
_context2.prev = 0;
|
|
2388
2391
|
aborter = new AbortController();
|
|
2389
|
-
view = getContainingView(self);
|
|
2392
|
+
view = getContainingView(self); // extra check for contentBlocks.length
|
|
2393
|
+
// https://github.com/GMOD/jbrowse-components/issues/2694
|
|
2390
2394
|
|
|
2391
|
-
if (view.initialized) {
|
|
2395
|
+
if (!(!view.initialized || !view.staticBlocks.contentBlocks.length)) {
|
|
2392
2396
|
_context2.next = 5;
|
|
2393
2397
|
break;
|
|
2394
2398
|
}
|
|
@@ -3237,7 +3241,8 @@ var Cytobands = /*#__PURE__*/observer(function (_ref2) {
|
|
|
3237
3241
|
var overview = _ref2.overview,
|
|
3238
3242
|
block = _ref2.block,
|
|
3239
3243
|
assembly = _ref2.assembly;
|
|
3240
|
-
var offsetPx = block.offsetPx
|
|
3244
|
+
var offsetPx = block.offsetPx,
|
|
3245
|
+
reversed = block.reversed;
|
|
3241
3246
|
var cytobands = assembly === null || assembly === void 0 ? void 0 : (_assembly$cytobands = assembly.cytobands) === null || _assembly$cytobands === void 0 ? void 0 : _assembly$cytobands.map(function (f) {
|
|
3242
3247
|
return {
|
|
3243
3248
|
refName: assembly.getCanonicalRefName(f.get('refName')),
|
|
@@ -3260,6 +3265,9 @@ var Cytobands = /*#__PURE__*/observer(function (_ref2) {
|
|
|
3260
3265
|
coord: end
|
|
3261
3266
|
}), type];
|
|
3262
3267
|
});
|
|
3268
|
+
var arr = cytobands || [];
|
|
3269
|
+
var lcap = reversed ? arr.length - 1 : 0;
|
|
3270
|
+
var rcap = reversed ? 0 : arr.length - 1;
|
|
3263
3271
|
var firstCent = true;
|
|
3264
3272
|
return cytobands ? /*#__PURE__*/React.createElement("g", {
|
|
3265
3273
|
transform: "translate(-".concat(offsetPx, ")")
|
|
@@ -3288,13 +3296,13 @@ var Cytobands = /*#__PURE__*/observer(function (_ref2) {
|
|
|
3288
3296
|
});
|
|
3289
3297
|
}
|
|
3290
3298
|
|
|
3291
|
-
if (
|
|
3299
|
+
if (lcap === index) {
|
|
3292
3300
|
return /*#__PURE__*/React.createElement("path", {
|
|
3293
3301
|
key: key,
|
|
3294
3302
|
d: leftRoundedRect(Math.min(start, end), 0, Math.abs(end - start), HEADER_OVERVIEW_HEIGHT, 8),
|
|
3295
3303
|
fill: colorMap[type]
|
|
3296
3304
|
});
|
|
3297
|
-
} else if (
|
|
3305
|
+
} else if (rcap === index) {
|
|
3298
3306
|
return /*#__PURE__*/React.createElement("path", {
|
|
3299
3307
|
key: key,
|
|
3300
3308
|
d: rightRoundedRect(Math.min(start, end), 0, Math.abs(end - start) - 2, HEADER_OVERVIEW_HEIGHT, 8),
|
|
@@ -3473,20 +3481,6 @@ function OverviewScaleBar(_ref7) {
|
|
|
3473
3481
|
|
|
3474
3482
|
var OverviewScaleBar$1 = /*#__PURE__*/observer(OverviewScaleBar);
|
|
3475
3483
|
|
|
3476
|
-
function getBpDisplayStr(totalBp) {
|
|
3477
|
-
var displayBp;
|
|
3478
|
-
|
|
3479
|
-
if (Math.floor(totalBp / 1000000) > 0) {
|
|
3480
|
-
displayBp = "".concat(parseFloat((totalBp / 1000000).toPrecision(3)), "Mbp");
|
|
3481
|
-
} else if (Math.floor(totalBp / 1000) > 0) {
|
|
3482
|
-
displayBp = "".concat(parseFloat((totalBp / 1000).toPrecision(3)), "Kbp");
|
|
3483
|
-
} else {
|
|
3484
|
-
displayBp = "".concat(Math.floor(totalBp), "bp");
|
|
3485
|
-
}
|
|
3486
|
-
|
|
3487
|
-
return displayBp;
|
|
3488
|
-
}
|
|
3489
|
-
|
|
3490
3484
|
function ScaleBar$1(_ref) {
|
|
3491
3485
|
var model = _ref.model,
|
|
3492
3486
|
fontSize = _ref.fontSize;
|
|
@@ -4369,51 +4363,7 @@ function ExportSvgDlg(_ref) {
|
|
|
4369
4363
|
}, "Submit")));
|
|
4370
4364
|
}
|
|
4371
4365
|
|
|
4372
|
-
var useStyles$9 = /*#__PURE__*/makeStyles(
|
|
4373
|
-
return {
|
|
4374
|
-
closeButton: {
|
|
4375
|
-
position: 'absolute',
|
|
4376
|
-
right: theme.spacing(1),
|
|
4377
|
-
top: theme.spacing(1),
|
|
4378
|
-
color: theme.palette.grey[500]
|
|
4379
|
-
}
|
|
4380
|
-
};
|
|
4381
|
-
});
|
|
4382
|
-
|
|
4383
|
-
function ReturnToImportFormDialog(_ref) {
|
|
4384
|
-
var model = _ref.model,
|
|
4385
|
-
handleClose = _ref.handleClose;
|
|
4386
|
-
var classes = useStyles$9();
|
|
4387
|
-
return /*#__PURE__*/React.createElement(Dialog, {
|
|
4388
|
-
maxWidth: "xl",
|
|
4389
|
-
open: true,
|
|
4390
|
-
onClose: handleClose
|
|
4391
|
-
}, /*#__PURE__*/React.createElement(DialogTitle, null, "Reference sequence", handleClose ? /*#__PURE__*/React.createElement(IconButton, {
|
|
4392
|
-
className: classes.closeButton,
|
|
4393
|
-
onClick: function onClick() {
|
|
4394
|
-
handleClose();
|
|
4395
|
-
}
|
|
4396
|
-
}, /*#__PURE__*/React.createElement(CloseIcon, null)) : null), /*#__PURE__*/React.createElement(Divider, null), /*#__PURE__*/React.createElement(DialogContent, null, /*#__PURE__*/React.createElement(Typography$1, null, "Are you sure you want to return to the import form? This will lose your current view")), /*#__PURE__*/React.createElement(DialogActions, null, /*#__PURE__*/React.createElement(Button$1, {
|
|
4397
|
-
onClick: function onClick() {
|
|
4398
|
-
model.clearView();
|
|
4399
|
-
handleClose();
|
|
4400
|
-
},
|
|
4401
|
-
variant: "contained",
|
|
4402
|
-
color: "primary",
|
|
4403
|
-
autoFocus: true
|
|
4404
|
-
}, "OK"), /*#__PURE__*/React.createElement(Button$1, {
|
|
4405
|
-
onClick: function onClick() {
|
|
4406
|
-
handleClose();
|
|
4407
|
-
},
|
|
4408
|
-
color: "secondary",
|
|
4409
|
-
variant: "contained",
|
|
4410
|
-
autoFocus: true
|
|
4411
|
-
}, "Cancel")));
|
|
4412
|
-
}
|
|
4413
|
-
|
|
4414
|
-
var ReturnToImportFormDlg = /*#__PURE__*/observer(ReturnToImportFormDialog);
|
|
4415
|
-
|
|
4416
|
-
var useStyles$a = /*#__PURE__*/makeStyles({
|
|
4366
|
+
var useStyles$9 = /*#__PURE__*/makeStyles({
|
|
4417
4367
|
container: {
|
|
4418
4368
|
display: 'flex',
|
|
4419
4369
|
flexDirection: 'row',
|
|
@@ -4426,7 +4376,7 @@ var useStyles$a = /*#__PURE__*/makeStyles({
|
|
|
4426
4376
|
|
|
4427
4377
|
function ZoomControls(_ref) {
|
|
4428
4378
|
var model = _ref.model;
|
|
4429
|
-
var classes = useStyles$
|
|
4379
|
+
var classes = useStyles$9();
|
|
4430
4380
|
var maxBpPerPx = model.maxBpPerPx,
|
|
4431
4381
|
minBpPerPx = model.minBpPerPx,
|
|
4432
4382
|
bpPerPx = model.bpPerPx,
|
|
@@ -4473,7 +4423,7 @@ function ZoomControls(_ref) {
|
|
|
4473
4423
|
|
|
4474
4424
|
var ZoomControls$1 = /*#__PURE__*/observer(ZoomControls);
|
|
4475
4425
|
|
|
4476
|
-
var useStyles$
|
|
4426
|
+
var useStyles$a = /*#__PURE__*/makeStyles$1(function (theme) {
|
|
4477
4427
|
return {
|
|
4478
4428
|
headerBar: {
|
|
4479
4429
|
height: HEADER_BAR_HEIGHT,
|
|
@@ -4508,7 +4458,7 @@ var useStyles$b = /*#__PURE__*/makeStyles$1(function (theme) {
|
|
|
4508
4458
|
});
|
|
4509
4459
|
var HeaderButtons = /*#__PURE__*/observer(function (_ref) {
|
|
4510
4460
|
var model = _ref.model;
|
|
4511
|
-
var classes = useStyles$
|
|
4461
|
+
var classes = useStyles$a();
|
|
4512
4462
|
return /*#__PURE__*/React.createElement(Button$1, {
|
|
4513
4463
|
onClick: model.activateTrackSelector,
|
|
4514
4464
|
className: classes.toggleButton,
|
|
@@ -4522,7 +4472,7 @@ var HeaderButtons = /*#__PURE__*/observer(function (_ref) {
|
|
|
4522
4472
|
|
|
4523
4473
|
function PanControls(_ref2) {
|
|
4524
4474
|
var model = _ref2.model;
|
|
4525
|
-
var classes = useStyles$
|
|
4475
|
+
var classes = useStyles$a();
|
|
4526
4476
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Button$1, {
|
|
4527
4477
|
variant: "outlined",
|
|
4528
4478
|
className: classes.panButton,
|
|
@@ -4540,7 +4490,7 @@ function PanControls(_ref2) {
|
|
|
4540
4490
|
|
|
4541
4491
|
var RegionWidth = /*#__PURE__*/observer(function (_ref3) {
|
|
4542
4492
|
var model = _ref3.model;
|
|
4543
|
-
var classes = useStyles$
|
|
4493
|
+
var classes = useStyles$a();
|
|
4544
4494
|
var coarseTotalBp = model.coarseTotalBp;
|
|
4545
4495
|
return /*#__PURE__*/React.createElement(Typography$1, {
|
|
4546
4496
|
variant: "body2",
|
|
@@ -4551,7 +4501,7 @@ var RegionWidth = /*#__PURE__*/observer(function (_ref3) {
|
|
|
4551
4501
|
|
|
4552
4502
|
var Controls = function Controls(_ref4) {
|
|
4553
4503
|
var model = _ref4.model;
|
|
4554
|
-
var classes = useStyles$
|
|
4504
|
+
var classes = useStyles$a();
|
|
4555
4505
|
return /*#__PURE__*/React.createElement("div", {
|
|
4556
4506
|
className: classes.headerBar
|
|
4557
4507
|
}, /*#__PURE__*/React.createElement(HeaderButtons, {
|
|
@@ -4585,7 +4535,7 @@ var LinearGenomeViewHeader = /*#__PURE__*/observer(function (_ref5) {
|
|
|
4585
4535
|
}));
|
|
4586
4536
|
});
|
|
4587
4537
|
|
|
4588
|
-
var useStyles$
|
|
4538
|
+
var useStyles$b = /*#__PURE__*/makeStyles$1(function (theme) {
|
|
4589
4539
|
return {
|
|
4590
4540
|
root: {
|
|
4591
4541
|
background: alpha(theme.palette.background.paper, 0.8),
|
|
@@ -4619,7 +4569,7 @@ var useStyles$c = /*#__PURE__*/makeStyles$1(function (theme) {
|
|
|
4619
4569
|
var TrackLabel = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
4620
4570
|
var _session$getTrackActi;
|
|
4621
4571
|
|
|
4622
|
-
var classes = useStyles$
|
|
4572
|
+
var classes = useStyles$b();
|
|
4623
4573
|
|
|
4624
4574
|
var _React$useState = React.useState(null),
|
|
4625
4575
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
@@ -4713,9 +4663,11 @@ var TrackLabel = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
4713
4663
|
});
|
|
4714
4664
|
var TrackLabel$1 = /*#__PURE__*/observer(TrackLabel);
|
|
4715
4665
|
|
|
4716
|
-
var useStyles$
|
|
4666
|
+
var useStyles$c = /*#__PURE__*/makeStyles(function (theme) {
|
|
4717
4667
|
return {
|
|
4718
|
-
root: {
|
|
4668
|
+
root: {
|
|
4669
|
+
marginTop: 2
|
|
4670
|
+
},
|
|
4719
4671
|
resizeHandle: {
|
|
4720
4672
|
height: RESIZE_HANDLE_HEIGHT,
|
|
4721
4673
|
boxSizing: 'border-box',
|
|
@@ -4731,6 +4683,11 @@ var useStyles$d = /*#__PURE__*/makeStyles(function (theme) {
|
|
|
4731
4683
|
zIndex: 3,
|
|
4732
4684
|
borderRadius: theme.shape.borderRadius
|
|
4733
4685
|
},
|
|
4686
|
+
trackLabel: {
|
|
4687
|
+
zIndex: 3
|
|
4688
|
+
},
|
|
4689
|
+
// aligns with block bounderies. check for example the breakpoint split view
|
|
4690
|
+
// demo to see if features align if wanting to change things
|
|
4734
4691
|
renderingComponentContainer: {
|
|
4735
4692
|
position: 'absolute',
|
|
4736
4693
|
// -1 offset because of the 1px border of the Paper
|
|
@@ -4738,10 +4695,6 @@ var useStyles$d = /*#__PURE__*/makeStyles(function (theme) {
|
|
|
4738
4695
|
height: '100%',
|
|
4739
4696
|
width: '100%'
|
|
4740
4697
|
},
|
|
4741
|
-
trackLabel: {
|
|
4742
|
-
zIndex: 3,
|
|
4743
|
-
margin: theme.spacing(1)
|
|
4744
|
-
},
|
|
4745
4698
|
trackLabelInline: {
|
|
4746
4699
|
position: 'relative',
|
|
4747
4700
|
display: 'inline-block'
|
|
@@ -4755,22 +4708,30 @@ var useStyles$d = /*#__PURE__*/makeStyles(function (theme) {
|
|
|
4755
4708
|
whiteSpace: 'nowrap',
|
|
4756
4709
|
position: 'relative',
|
|
4757
4710
|
background: 'none',
|
|
4758
|
-
zIndex: 2
|
|
4759
|
-
boxSizing: 'content-box'
|
|
4711
|
+
zIndex: 2
|
|
4760
4712
|
}
|
|
4761
4713
|
};
|
|
4762
4714
|
});
|
|
4715
|
+
var TrackContainerLabel = /*#__PURE__*/observer(function (_ref) {
|
|
4716
|
+
var model = _ref.model,
|
|
4717
|
+
view = _ref.view;
|
|
4718
|
+
var classes = useStyles$c();
|
|
4719
|
+
var labelStyle = view.trackLabels === 'overlapping' ? classes.trackLabelOverlap : classes.trackLabelInline;
|
|
4720
|
+
return view.trackLabels !== 'hidden' ? /*#__PURE__*/React.createElement(TrackLabel$1, {
|
|
4721
|
+
track: model,
|
|
4722
|
+
className: clsx(classes.trackLabel, labelStyle)
|
|
4723
|
+
}) : null;
|
|
4724
|
+
});
|
|
4763
4725
|
|
|
4764
|
-
function TrackContainer(
|
|
4765
|
-
var
|
|
4766
|
-
|
|
4767
|
-
|
|
4726
|
+
function TrackContainer(_ref2) {
|
|
4727
|
+
var model = _ref2.model,
|
|
4728
|
+
track = _ref2.track;
|
|
4729
|
+
var classes = useStyles$c();
|
|
4768
4730
|
var display = track.displays[0];
|
|
4769
4731
|
var horizontalScroll = model.horizontalScroll,
|
|
4770
4732
|
draggingTrackId = model.draggingTrackId,
|
|
4771
4733
|
moveTrack = model.moveTrack;
|
|
4772
4734
|
var height = display.height;
|
|
4773
|
-
var view = getContainingView(display);
|
|
4774
4735
|
var trackId = getConf(track, 'trackId');
|
|
4775
4736
|
var ref = useRef(null);
|
|
4776
4737
|
useEffect(function () {
|
|
@@ -4793,13 +4754,13 @@ function TrackContainer(props) {
|
|
|
4793
4754
|
var RenderingComponent = display.RenderingComponent,
|
|
4794
4755
|
DisplayBlurb = display.DisplayBlurb;
|
|
4795
4756
|
var dimmed = draggingTrackId !== undefined && draggingTrackId !== display.id;
|
|
4796
|
-
return /*#__PURE__*/React.createElement(
|
|
4797
|
-
className: classes.root
|
|
4798
|
-
|
|
4799
|
-
|
|
4800
|
-
|
|
4801
|
-
|
|
4802
|
-
|
|
4757
|
+
return /*#__PURE__*/React.createElement(Paper$1, {
|
|
4758
|
+
className: classes.root,
|
|
4759
|
+
variant: "outlined"
|
|
4760
|
+
}, /*#__PURE__*/React.createElement(TrackContainerLabel, {
|
|
4761
|
+
model: track,
|
|
4762
|
+
view: model
|
|
4763
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
4803
4764
|
className: classes.trackRenderingContainer,
|
|
4804
4765
|
style: {
|
|
4805
4766
|
height: height
|
|
@@ -4809,7 +4770,7 @@ function TrackContainer(props) {
|
|
|
4809
4770
|
display.setScrollTop(target.scrollTop);
|
|
4810
4771
|
},
|
|
4811
4772
|
onDragEnter: debouncedOnDragEnter,
|
|
4812
|
-
"data-testid": "trackRenderingContainer-".concat(
|
|
4773
|
+
"data-testid": "trackRenderingContainer-".concat(model.id, "-").concat(trackId),
|
|
4813
4774
|
role: "presentation"
|
|
4814
4775
|
}, /*#__PURE__*/React.createElement("div", {
|
|
4815
4776
|
ref: ref,
|
|
@@ -4819,7 +4780,6 @@ function TrackContainer(props) {
|
|
|
4819
4780
|
}
|
|
4820
4781
|
}, /*#__PURE__*/React.createElement(RenderingComponent, {
|
|
4821
4782
|
model: display,
|
|
4822
|
-
blockState: {},
|
|
4823
4783
|
onHorizontalScroll: horizontalScroll
|
|
4824
4784
|
})), DisplayBlurb ? /*#__PURE__*/React.createElement("div", {
|
|
4825
4785
|
style: {
|
|
@@ -4827,7 +4787,7 @@ function TrackContainer(props) {
|
|
|
4827
4787
|
left: 0,
|
|
4828
4788
|
top: display.height - 20
|
|
4829
4789
|
}
|
|
4830
|
-
},
|
|
4790
|
+
}, /*#__PURE__*/React.createElement(DisplayBlurb, {
|
|
4831
4791
|
model: display
|
|
4832
4792
|
})) : null), /*#__PURE__*/React.createElement("div", {
|
|
4833
4793
|
className: classes.overlay,
|
|
@@ -4844,7 +4804,7 @@ function TrackContainer(props) {
|
|
|
4844
4804
|
|
|
4845
4805
|
var TrackContainer$1 = /*#__PURE__*/observer(TrackContainer);
|
|
4846
4806
|
|
|
4847
|
-
var useStyles$
|
|
4807
|
+
var useStyles$d = /*#__PURE__*/makeStyles(function (theme) {
|
|
4848
4808
|
var background = theme.palette.tertiary ? alpha$1(theme.palette.tertiary.main, 0.7) : alpha$1(theme.palette.primary.main, 0.7);
|
|
4849
4809
|
return {
|
|
4850
4810
|
rubberBand: {
|
|
@@ -4883,7 +4843,7 @@ var useStyles$e = /*#__PURE__*/makeStyles(function (theme) {
|
|
|
4883
4843
|
var VerticalGuide = /*#__PURE__*/observer(function (_ref) {
|
|
4884
4844
|
var model = _ref.model,
|
|
4885
4845
|
coordX = _ref.coordX;
|
|
4886
|
-
var classes = useStyles$
|
|
4846
|
+
var classes = useStyles$d();
|
|
4887
4847
|
return /*#__PURE__*/React.createElement(Tooltip$2, {
|
|
4888
4848
|
open: true,
|
|
4889
4849
|
placement: "top",
|
|
@@ -4927,7 +4887,7 @@ function RubberBand(_ref2) {
|
|
|
4927
4887
|
|
|
4928
4888
|
var controlsRef = useRef(null);
|
|
4929
4889
|
var rubberBandRef = useRef(null);
|
|
4930
|
-
var classes = useStyles$
|
|
4890
|
+
var classes = useStyles$d();
|
|
4931
4891
|
var mouseDragging = startX !== undefined && anchorPosition === undefined;
|
|
4932
4892
|
var setOffsets = model.setOffsets,
|
|
4933
4893
|
pxToBp = model.pxToBp;
|
|
@@ -5130,7 +5090,7 @@ RubberBand.defaultProps = {
|
|
|
5130
5090
|
var RubberBand$1 = /*#__PURE__*/observer(RubberBand);
|
|
5131
5091
|
|
|
5132
5092
|
var _excluded$1 = ["model", "style", "className"];
|
|
5133
|
-
var useStyles$
|
|
5093
|
+
var useStyles$e = /*#__PURE__*/makeStyles(function (theme) {
|
|
5134
5094
|
return {
|
|
5135
5095
|
scaleBarContainer: {
|
|
5136
5096
|
overflow: 'hidden',
|
|
@@ -5174,7 +5134,7 @@ var useStyles$f = /*#__PURE__*/makeStyles(function (theme) {
|
|
|
5174
5134
|
});
|
|
5175
5135
|
var RenderedRefNameLabels = /*#__PURE__*/observer(function (_ref) {
|
|
5176
5136
|
var model = _ref.model;
|
|
5177
|
-
var classes = useStyles$
|
|
5137
|
+
var classes = useStyles$e(); // find the block that needs pinning to the left side for context
|
|
5178
5138
|
|
|
5179
5139
|
var lastLeftBlock = 0;
|
|
5180
5140
|
model.staticBlocks.forEach(function (block, i) {
|
|
@@ -5196,7 +5156,7 @@ var RenderedRefNameLabels = /*#__PURE__*/observer(function (_ref) {
|
|
|
5196
5156
|
});
|
|
5197
5157
|
var RenderedScaleBarLabels = /*#__PURE__*/observer(function (_ref2) {
|
|
5198
5158
|
var model = _ref2.model;
|
|
5199
|
-
var classes = useStyles$
|
|
5159
|
+
var classes = useStyles$e();
|
|
5200
5160
|
return /*#__PURE__*/React.createElement(React.Fragment, null, model.staticBlocks.map(function (block, index) {
|
|
5201
5161
|
if (block instanceof ContentBlock$1) {
|
|
5202
5162
|
var ticks = makeTicks(block.start, block.end, model.bpPerPx, true, false);
|
|
@@ -5249,7 +5209,7 @@ var ScaleBar$2 = /*#__PURE__*/React.forwardRef(function (_ref3, ref) {
|
|
|
5249
5209
|
className = _ref3.className,
|
|
5250
5210
|
other = _objectWithoutProperties(_ref3, _excluded$1);
|
|
5251
5211
|
|
|
5252
|
-
var classes = useStyles$
|
|
5212
|
+
var classes = useStyles$e();
|
|
5253
5213
|
var offsetLeft = model.staticBlocks.offsetPx - model.offsetPx;
|
|
5254
5214
|
return /*#__PURE__*/React.createElement(Paper$1, Object.assign({
|
|
5255
5215
|
"data-resizer": "true" // used to avoid click-and-drag scrolls on trackscontainer
|
|
@@ -5277,7 +5237,7 @@ var ScaleBar$2 = /*#__PURE__*/React.forwardRef(function (_ref3, ref) {
|
|
|
5277
5237
|
});
|
|
5278
5238
|
var ScaleBar$3 = /*#__PURE__*/observer(ScaleBar$2);
|
|
5279
5239
|
|
|
5280
|
-
var useStyles$
|
|
5240
|
+
var useStyles$f = /*#__PURE__*/makeStyles(function (theme) {
|
|
5281
5241
|
return {
|
|
5282
5242
|
verticalGuidesZoomContainer: {
|
|
5283
5243
|
position: 'absolute',
|
|
@@ -5308,7 +5268,7 @@ var useStyles$g = /*#__PURE__*/makeStyles(function (theme) {
|
|
|
5308
5268
|
});
|
|
5309
5269
|
var RenderedVerticalGuides = /*#__PURE__*/observer(function (_ref) {
|
|
5310
5270
|
var model = _ref.model;
|
|
5311
|
-
var classes = useStyles$
|
|
5271
|
+
var classes = useStyles$f();
|
|
5312
5272
|
return /*#__PURE__*/React.createElement(React.Fragment, null, model.staticBlocks.map(function (block, index) {
|
|
5313
5273
|
if (block instanceof ContentBlock$1) {
|
|
5314
5274
|
var ticks = makeTicks(block.start, block.end, model.bpPerPx);
|
|
@@ -5348,7 +5308,7 @@ var RenderedVerticalGuides = /*#__PURE__*/observer(function (_ref) {
|
|
|
5348
5308
|
|
|
5349
5309
|
function VerticalGuides(_ref2) {
|
|
5350
5310
|
var model = _ref2.model;
|
|
5351
|
-
var classes = useStyles$
|
|
5311
|
+
var classes = useStyles$f(); // find the block that needs pinning to the left side for context
|
|
5352
5312
|
|
|
5353
5313
|
var offsetLeft = model.staticBlocks.offsetPx - model.offsetPx;
|
|
5354
5314
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -5369,7 +5329,7 @@ function VerticalGuides(_ref2) {
|
|
|
5369
5329
|
|
|
5370
5330
|
var VerticalGuides$1 = /*#__PURE__*/observer(VerticalGuides);
|
|
5371
5331
|
|
|
5372
|
-
var useStyles$
|
|
5332
|
+
var useStyles$g = /*#__PURE__*/makeStyles(function () {
|
|
5373
5333
|
return {
|
|
5374
5334
|
centerLineContainer: {
|
|
5375
5335
|
background: 'transparent',
|
|
@@ -5398,7 +5358,7 @@ function CenterLine(_ref) {
|
|
|
5398
5358
|
tracks = model.tracks,
|
|
5399
5359
|
width = model.width;
|
|
5400
5360
|
var ref = useRef(null);
|
|
5401
|
-
var classes = useStyles$
|
|
5361
|
+
var classes = useStyles$g();
|
|
5402
5362
|
var startingPosition = width / 2;
|
|
5403
5363
|
return tracks.length ? /*#__PURE__*/React.createElement("div", {
|
|
5404
5364
|
"data-testid": "centerline_container",
|
|
@@ -5425,7 +5385,7 @@ CenterLine.propTypes = {
|
|
|
5425
5385
|
};
|
|
5426
5386
|
var CenterLine$1 = /*#__PURE__*/observer(CenterLine);
|
|
5427
5387
|
|
|
5428
|
-
var useStyles$
|
|
5388
|
+
var useStyles$h = /*#__PURE__*/makeStyles(function (theme) {
|
|
5429
5389
|
return {
|
|
5430
5390
|
tracksContainer: {
|
|
5431
5391
|
position: 'relative',
|
|
@@ -5442,7 +5402,7 @@ var useStyles$i = /*#__PURE__*/makeStyles(function (theme) {
|
|
|
5442
5402
|
function TracksContainer(_ref) {
|
|
5443
5403
|
var children = _ref.children,
|
|
5444
5404
|
model = _ref.model;
|
|
5445
|
-
var classes = useStyles$
|
|
5405
|
+
var classes = useStyles$h(); // refs are to store these variables to avoid repeated rerenders associated
|
|
5446
5406
|
// with useState/setState
|
|
5447
5407
|
|
|
5448
5408
|
var delta = useRef(0);
|
|
@@ -5598,8 +5558,6 @@ function TracksContainer(_ref) {
|
|
|
5598
5558
|
boxSizing: 'border-box'
|
|
5599
5559
|
}
|
|
5600
5560
|
})
|
|
5601
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
5602
|
-
className: classes.spacer
|
|
5603
5561
|
}), children);
|
|
5604
5562
|
}
|
|
5605
5563
|
|
|
@@ -5608,7 +5566,7 @@ var TracksContainer$1 = /*#__PURE__*/observer(TracksContainer);
|
|
|
5608
5566
|
var SearchResultsDialog = /*#__PURE__*/lazy(function () {
|
|
5609
5567
|
return Promise.resolve().then(function () { return SearchResultsDialog$2; });
|
|
5610
5568
|
});
|
|
5611
|
-
var useStyles$
|
|
5569
|
+
var useStyles$i = /*#__PURE__*/makeStyles$1(function (theme) {
|
|
5612
5570
|
return {
|
|
5613
5571
|
importFormContainer: {
|
|
5614
5572
|
padding: theme.spacing(2)
|
|
@@ -5622,7 +5580,7 @@ var ImportForm = /*#__PURE__*/observer(function (_ref) {
|
|
|
5622
5580
|
var _regions$;
|
|
5623
5581
|
|
|
5624
5582
|
var model = _ref.model;
|
|
5625
|
-
var classes = useStyles$
|
|
5583
|
+
var classes = useStyles$i();
|
|
5626
5584
|
var session = getSession(model);
|
|
5627
5585
|
var assemblyNames = session.assemblyNames,
|
|
5628
5586
|
assemblyManager = session.assemblyManager,
|
|
@@ -5922,7 +5880,7 @@ var MiniControls = /*#__PURE__*/observer(function (props) {
|
|
|
5922
5880
|
}));
|
|
5923
5881
|
});
|
|
5924
5882
|
|
|
5925
|
-
var useStyles$
|
|
5883
|
+
var useStyles$j = /*#__PURE__*/makeStyles$1(function (theme) {
|
|
5926
5884
|
return {
|
|
5927
5885
|
loadingMessage: {
|
|
5928
5886
|
padding: theme.spacing(5)
|
|
@@ -6018,7 +5976,7 @@ function _fetchSequence() {
|
|
|
6018
5976
|
function SequenceDialog(_ref) {
|
|
6019
5977
|
var model = _ref.model,
|
|
6020
5978
|
handleClose = _ref.handleClose;
|
|
6021
|
-
var classes = useStyles$
|
|
5979
|
+
var classes = useStyles$j();
|
|
6022
5980
|
var session = getSession(model);
|
|
6023
5981
|
|
|
6024
5982
|
var _useState = useState(),
|
|
@@ -6183,7 +6141,7 @@ function SequenceDialog(_ref) {
|
|
|
6183
6141
|
|
|
6184
6142
|
var SequenceDialog$1 = /*#__PURE__*/observer(SequenceDialog);
|
|
6185
6143
|
|
|
6186
|
-
var useStyles$
|
|
6144
|
+
var useStyles$k = /*#__PURE__*/makeStyles$1(function (theme) {
|
|
6187
6145
|
return {
|
|
6188
6146
|
dialogContent: {
|
|
6189
6147
|
width: '80em'
|
|
@@ -6202,7 +6160,7 @@ function SearchResultsDialog$1(_ref) {
|
|
|
6202
6160
|
var model = _ref.model,
|
|
6203
6161
|
optAssemblyName = _ref.optAssemblyName,
|
|
6204
6162
|
handleClose = _ref.handleClose;
|
|
6205
|
-
var classes = useStyles$
|
|
6163
|
+
var classes = useStyles$k();
|
|
6206
6164
|
var session = getSession(model);
|
|
6207
6165
|
|
|
6208
6166
|
var _getEnv = getEnv(session),
|
|
@@ -6323,11 +6281,11 @@ function SearchResultsDialog$1(_ref) {
|
|
|
6323
6281
|
|
|
6324
6282
|
var SearchResultsDialog$2 = {
|
|
6325
6283
|
__proto__: null,
|
|
6326
|
-
useStyles: useStyles$
|
|
6284
|
+
useStyles: useStyles$k,
|
|
6327
6285
|
'default': SearchResultsDialog$1
|
|
6328
6286
|
};
|
|
6329
6287
|
|
|
6330
|
-
var useStyles$
|
|
6288
|
+
var useStyles$l = /*#__PURE__*/makeStyles$1(function (theme) {
|
|
6331
6289
|
return {
|
|
6332
6290
|
note: {
|
|
6333
6291
|
textAlign: 'center',
|
|
@@ -6363,7 +6321,7 @@ var LinearGenomeView = /*#__PURE__*/observer(function (_ref) {
|
|
|
6363
6321
|
hideHeader = model.hideHeader,
|
|
6364
6322
|
initialized = model.initialized,
|
|
6365
6323
|
hasDisplayedRegions = model.hasDisplayedRegions;
|
|
6366
|
-
var classes = useStyles$
|
|
6324
|
+
var classes = useStyles$l();
|
|
6367
6325
|
|
|
6368
6326
|
if (!initialized && !error) {
|
|
6369
6327
|
return /*#__PURE__*/React.createElement(Typography$1, {
|
|
@@ -6444,7 +6402,7 @@ function calculateVisibleLocStrings(contentBlocks) {
|
|
|
6444
6402
|
assemblyName: isSingleAssemblyName ? undefined : block.assemblyName
|
|
6445
6403
|
}));
|
|
6446
6404
|
});
|
|
6447
|
-
return locs.join('
|
|
6405
|
+
return locs.join(' ');
|
|
6448
6406
|
}
|
|
6449
6407
|
|
|
6450
6408
|
var HEADER_BAR_HEIGHT = 48;
|
|
@@ -7008,100 +6966,73 @@ function stateModelFactory$1(pluginManager) {
|
|
|
7008
6966
|
throw new Error("invalid track selector type ".concat(self.trackSelectorType));
|
|
7009
6967
|
},
|
|
7010
6968
|
navToLocString: function navToLocString(locString, optAssemblyName) {
|
|
6969
|
+
var assemblyNames = self.assemblyNames;
|
|
6970
|
+
|
|
7011
6971
|
var _getSession3 = getSession(self),
|
|
7012
6972
|
assemblyManager = _getSession3.assemblyManager;
|
|
7013
6973
|
|
|
7014
6974
|
var isValidRefName = assemblyManager.isValidRefName;
|
|
7015
|
-
var
|
|
7016
|
-
|
|
7017
|
-
|
|
7018
|
-
|
|
7019
|
-
|
|
6975
|
+
var assemblyName = optAssemblyName || assemblyNames[0];
|
|
6976
|
+
var parsedLocStrings = locString.split(' ').filter(function (f) {
|
|
6977
|
+
return !!f.trim();
|
|
6978
|
+
}).map(function (l) {
|
|
6979
|
+
return parseLocString(l, function (ref) {
|
|
6980
|
+
return isValidRefName(ref, assemblyName);
|
|
7020
6981
|
});
|
|
7021
|
-
this.navToMultiple(locations);
|
|
7022
|
-
return;
|
|
7023
|
-
}
|
|
7024
|
-
|
|
7025
|
-
var assemblyName = optAssemblyName;
|
|
7026
|
-
var defaultRefName = '';
|
|
7027
|
-
|
|
7028
|
-
if (self.displayedRegions.length !== 0) {
|
|
7029
|
-
// defaults
|
|
7030
|
-
assemblyName = self.displayedRegions[0].assemblyName;
|
|
7031
|
-
defaultRefName = self.displayedRegions[0].refName;
|
|
7032
|
-
}
|
|
7033
|
-
|
|
7034
|
-
var assembly = assemblyName && assemblyManager.get(assemblyName);
|
|
7035
|
-
|
|
7036
|
-
if (!assembly) {
|
|
7037
|
-
throw new Error("Could not find assembly ".concat(assemblyName));
|
|
7038
|
-
}
|
|
7039
|
-
|
|
7040
|
-
var _assembly = assembly,
|
|
7041
|
-
regions = _assembly.regions;
|
|
7042
|
-
|
|
7043
|
-
if (!regions) {
|
|
7044
|
-
throw new Error("Regions for assembly ".concat(assemblyName, " not yet loaded"));
|
|
7045
|
-
}
|
|
7046
|
-
|
|
7047
|
-
if (locStrings.length > 1) {
|
|
7048
|
-
throw new Error('Navigating to multiple locations is not allowed when viewing a whole chromosome');
|
|
7049
|
-
}
|
|
7050
|
-
|
|
7051
|
-
var parsedLocString = parseLocString(locStrings[0], function (refName) {
|
|
7052
|
-
return isValidRefName(refName, assemblyName);
|
|
7053
6982
|
});
|
|
7054
|
-
var
|
|
6983
|
+
var locations = parsedLocStrings.map(function (region) {
|
|
6984
|
+
var asmName = region.assemblyName || assemblyName;
|
|
6985
|
+
var asm = assemblyManager.get(asmName);
|
|
6986
|
+
var refName = region.refName;
|
|
7055
6987
|
|
|
7056
|
-
|
|
7057
|
-
|
|
7058
|
-
|
|
7059
|
-
if (!newAssembly) {
|
|
7060
|
-
throw new Error("Could not find assembly ".concat(parsedLocString.assemblyName));
|
|
6988
|
+
if (!asm) {
|
|
6989
|
+
throw new Error("assembly ".concat(asmName, " not found"));
|
|
7061
6990
|
}
|
|
7062
6991
|
|
|
7063
|
-
|
|
7064
|
-
changedAssembly = true;
|
|
7065
|
-
var newRegions = newAssembly.regions;
|
|
6992
|
+
var regions = asm.regions;
|
|
7066
6993
|
|
|
7067
|
-
if (!
|
|
7068
|
-
throw new Error("
|
|
6994
|
+
if (!regions) {
|
|
6995
|
+
throw new Error("regions not loaded yet for ".concat(asmName));
|
|
7069
6996
|
}
|
|
7070
6997
|
|
|
7071
|
-
|
|
7072
|
-
}
|
|
7073
|
-
|
|
7074
|
-
var canonicalRefName = assembly.getCanonicalRefName(parsedLocString.refName);
|
|
6998
|
+
var canonicalRefName = asm.getCanonicalRefName(region.refName);
|
|
7075
6999
|
|
|
7076
|
-
|
|
7077
|
-
|
|
7078
|
-
|
|
7000
|
+
if (!canonicalRefName) {
|
|
7001
|
+
throw new Error("Could not find refName ".concat(refName, " in ").concat(asm.name));
|
|
7002
|
+
}
|
|
7079
7003
|
|
|
7080
|
-
|
|
7081
|
-
var newDisplayedRegion = regions.find(function (region) {
|
|
7004
|
+
var parentRegion = regions.find(function (region) {
|
|
7082
7005
|
return region.refName === canonicalRefName;
|
|
7083
7006
|
});
|
|
7084
7007
|
|
|
7085
|
-
if (
|
|
7086
|
-
|
|
7087
|
-
} else {
|
|
7088
|
-
throw new Error("Could not find refName ".concat(parsedLocString.refName, " in ").concat(assembly.name));
|
|
7008
|
+
if (!parentRegion) {
|
|
7009
|
+
throw new Error("Could not find refName ".concat(refName, " in ").concat(asmName));
|
|
7089
7010
|
}
|
|
7090
|
-
}
|
|
7091
7011
|
|
|
7092
|
-
|
|
7093
|
-
|
|
7012
|
+
return _objectSpread2(_objectSpread2({}, region), {}, {
|
|
7013
|
+
assemblyName: asmName,
|
|
7014
|
+
parentRegion: parentRegion
|
|
7015
|
+
});
|
|
7094
7016
|
});
|
|
7095
7017
|
|
|
7096
|
-
if (
|
|
7097
|
-
var
|
|
7098
|
-
|
|
7099
|
-
|
|
7100
|
-
|
|
7101
|
-
|
|
7102
|
-
|
|
7103
|
-
|
|
7018
|
+
if (locations.length === 1) {
|
|
7019
|
+
var loc = locations[0];
|
|
7020
|
+
this.setDisplayedRegions([_objectSpread2({
|
|
7021
|
+
reversed: loc.reversed
|
|
7022
|
+
}, loc.parentRegion)]);
|
|
7023
|
+
var start = loc.start,
|
|
7024
|
+
end = loc.end,
|
|
7025
|
+
parentRegion = loc.parentRegion;
|
|
7026
|
+
this.navTo(_objectSpread2(_objectSpread2({}, loc), {}, {
|
|
7027
|
+
start: clamp(start !== null && start !== void 0 ? start : 0, 0, parentRegion.end),
|
|
7028
|
+
end: clamp(end !== null && end !== void 0 ? end : parentRegion.end, 0, parentRegion.end)
|
|
7104
7029
|
}));
|
|
7030
|
+
} else {
|
|
7031
|
+
this.setDisplayedRegions( // @ts-ignore
|
|
7032
|
+
locations.map(function (r) {
|
|
7033
|
+
return r.start === undefined ? r.parentRegion : r;
|
|
7034
|
+
}));
|
|
7035
|
+
this.showAllRegions();
|
|
7105
7036
|
}
|
|
7106
7037
|
},
|
|
7107
7038
|
|
|
@@ -7223,26 +7154,6 @@ function stateModelFactory$1(pluginManager) {
|
|
|
7223
7154
|
if (location.refName !== region.refName) {
|
|
7224
7155
|
throw new Error("Entered location ".concat(assembleLocString(location), " does not match with displayed regions"));
|
|
7225
7156
|
}
|
|
7226
|
-
|
|
7227
|
-
if (locationIndex > 0) {
|
|
7228
|
-
// does it reach the left side?
|
|
7229
|
-
var matchesLeft = region.reversed ? locationEnd === region.end : locationStart === region.start;
|
|
7230
|
-
|
|
7231
|
-
if (!matchesLeft) {
|
|
7232
|
-
throw new Error("".concat(region.reversed ? 'End' : 'Start', " of region ").concat(assembleLocString(location), " should be ").concat((region.reversed ? region.end : region.start + 1).toLocaleString('en-US'), ", but it is not"));
|
|
7233
|
-
}
|
|
7234
|
-
}
|
|
7235
|
-
|
|
7236
|
-
var isLast = locationIndex === locations.length - 1;
|
|
7237
|
-
|
|
7238
|
-
if (!isLast) {
|
|
7239
|
-
// does it reach the right side?
|
|
7240
|
-
var matchesRight = region.reversed ? locationStart === region.start : locationEnd === region.end;
|
|
7241
|
-
|
|
7242
|
-
if (!matchesRight) {
|
|
7243
|
-
throw new Error("".concat(region.reversed ? 'Start' : 'End', " of region ").concat(assembleLocString(location), " should be ").concat((region.reversed ? region.start + 1 : region.end).toLocaleString('en-US'), ", but it is not"));
|
|
7244
|
-
}
|
|
7245
|
-
}
|
|
7246
7157
|
}
|
|
7247
7158
|
|
|
7248
7159
|
locationIndex -= 1;
|
|
@@ -7537,10 +7448,10 @@ function stateModelFactory$1(pluginManager) {
|
|
|
7537
7448
|
var menuItems = [{
|
|
7538
7449
|
label: 'Return to import form',
|
|
7539
7450
|
onClick: function onClick() {
|
|
7540
|
-
getSession(self).queueDialog(function (
|
|
7541
|
-
return [
|
|
7451
|
+
getSession(self).queueDialog(function (handleClose) {
|
|
7452
|
+
return [ReturnToImportFormDialog, {
|
|
7542
7453
|
model: self,
|
|
7543
|
-
handleClose:
|
|
7454
|
+
handleClose: handleClose
|
|
7544
7455
|
}];
|
|
7545
7456
|
});
|
|
7546
7457
|
},
|
|
@@ -7549,10 +7460,10 @@ function stateModelFactory$1(pluginManager) {
|
|
|
7549
7460
|
label: 'Export SVG',
|
|
7550
7461
|
icon: PhotoCameraIcon,
|
|
7551
7462
|
onClick: function onClick() {
|
|
7552
|
-
getSession(self).queueDialog(function (
|
|
7463
|
+
getSession(self).queueDialog(function (handleClose) {
|
|
7553
7464
|
return [ExportSvgDlg, {
|
|
7554
7465
|
model: self,
|
|
7555
|
-
handleClose:
|
|
7466
|
+
handleClose: handleClose
|
|
7556
7467
|
}];
|
|
7557
7468
|
});
|
|
7558
7469
|
}
|
|
@@ -8079,7 +7990,7 @@ var LinearGenomeViewPlugin = /*#__PURE__*/function (_Plugin) {
|
|
|
8079
7990
|
return LinearGenomeViewPlugin;
|
|
8080
7991
|
}(Plugin);
|
|
8081
7992
|
|
|
8082
|
-
var useStyles$
|
|
7993
|
+
var useStyles$m = /*#__PURE__*/makeStyles$1(function (theme) {
|
|
8083
7994
|
return {
|
|
8084
7995
|
closeButton: {
|
|
8085
7996
|
position: 'absolute',
|
|
@@ -8091,7 +8002,7 @@ var useStyles$n = /*#__PURE__*/makeStyles$1(function (theme) {
|
|
|
8091
8002
|
});
|
|
8092
8003
|
function HelpDialog$1(_ref) {
|
|
8093
8004
|
var handleClose = _ref.handleClose;
|
|
8094
|
-
var classes = useStyles$
|
|
8005
|
+
var classes = useStyles$m();
|
|
8095
8006
|
return /*#__PURE__*/React.createElement(Dialog, {
|
|
8096
8007
|
open: true,
|
|
8097
8008
|
maxWidth: "xl",
|
|
@@ -8102,7 +8013,7 @@ function HelpDialog$1(_ref) {
|
|
|
8102
8013
|
onClick: function onClick() {
|
|
8103
8014
|
handleClose();
|
|
8104
8015
|
}
|
|
8105
|
-
}, /*#__PURE__*/React.createElement(CloseIcon, null)) : null), /*#__PURE__*/React.createElement(Divider, null), /*#__PURE__*/React.createElement(DialogContent, null, /*#__PURE__*/React.createElement("h3", null, "Searching"), /*#__PURE__*/React.createElement("ul", null, /*#__PURE__*/React.createElement("li", null, "Jump to a feature or reference sequence by typing its name in the location box and pressing Enter."), /*#__PURE__*/React.createElement("li", null, "Jump to a specific region by typing the region into the location box as: ", /*#__PURE__*/React.createElement("code", null, "ref:start..end"), " or ", /*#__PURE__*/React.createElement("code", null, "ref:start-end"), ". Commas are allowed in the start and end coordinates.")), /*#__PURE__*/React.createElement("h3", null, "Example Searches"), /*#__PURE__*/React.createElement("ul", null, /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("code", null, "BRCA"), " - searches for the feature named BRCA"), /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("code", null, "chr4"), " - jumps to chromosome 4"), /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("code", null, "chr4:79,500,000..80,000,000"), " - jumps the region on chromosome 4 between 79.5Mb and 80Mb."))), /*#__PURE__*/React.createElement(Divider, null), /*#__PURE__*/React.createElement(DialogActions, null, /*#__PURE__*/React.createElement(Button$1, {
|
|
8016
|
+
}, /*#__PURE__*/React.createElement(CloseIcon, null)) : null), /*#__PURE__*/React.createElement(Divider, null), /*#__PURE__*/React.createElement(DialogContent, null, /*#__PURE__*/React.createElement("h3", null, "Searching"), /*#__PURE__*/React.createElement("ul", null, /*#__PURE__*/React.createElement("li", null, "Jump to a feature or reference sequence by typing its name in the location box and pressing Enter."), /*#__PURE__*/React.createElement("li", null, "Jump to a specific region by typing the region into the location box as: ", /*#__PURE__*/React.createElement("code", null, "ref:start..end"), " or ", /*#__PURE__*/React.createElement("code", null, "ref:start-end"), ". Commas are allowed in the start and end coordinates. A space-separated list of locstrings can be used to open up multiple chromosomes at a time")), /*#__PURE__*/React.createElement("h3", null, "Example Searches"), /*#__PURE__*/React.createElement("ul", null, /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("code", null, "BRCA"), " - searches for the feature named BRCA"), /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("code", null, "chr4"), " - jumps to chromosome 4"), /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("code", null, "chr4:79,500,000..80,000,000"), " - jumps the region on chromosome 4 between 79.5Mb and 80Mb."), /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("code", null, "chr1:1-100 chr2:1-100"), " - create a split view of chr1:1-100 and chr2:1-100"), /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("code", null, "chr1 chr2 chr3"), " - open up multiple chromosomes at once"), /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("code", null, "chr1:1-100[rev] chr2:1-100"), " - open up the first region in the horizontally flipped orientation"))), /*#__PURE__*/React.createElement(Divider, null), /*#__PURE__*/React.createElement(DialogActions, null, /*#__PURE__*/React.createElement(Button$1, {
|
|
8106
8017
|
onClick: function onClick() {
|
|
8107
8018
|
return handleClose();
|
|
8108
8019
|
},
|
|
@@ -8112,11 +8023,11 @@ function HelpDialog$1(_ref) {
|
|
|
8112
8023
|
|
|
8113
8024
|
var HelpDialog$2 = {
|
|
8114
8025
|
__proto__: null,
|
|
8115
|
-
useStyles: useStyles$
|
|
8026
|
+
useStyles: useStyles$m,
|
|
8116
8027
|
'default': HelpDialog$1
|
|
8117
8028
|
};
|
|
8118
8029
|
|
|
8119
|
-
var useStyles$
|
|
8030
|
+
var useStyles$n = /*#__PURE__*/makeStyles$1(function (theme) {
|
|
8120
8031
|
return {
|
|
8121
8032
|
root: {
|
|
8122
8033
|
width: 500
|
|
@@ -8136,7 +8047,7 @@ var useStyles$o = /*#__PURE__*/makeStyles$1(function (theme) {
|
|
|
8136
8047
|
function SetMaxHeightDlg$1(props) {
|
|
8137
8048
|
var model = props.model,
|
|
8138
8049
|
handleClose = props.handleClose;
|
|
8139
|
-
var classes = useStyles$
|
|
8050
|
+
var classes = useStyles$n();
|
|
8140
8051
|
var _model$maxHeight = model.maxHeight,
|
|
8141
8052
|
maxHeight = _model$maxHeight === void 0 ? '' : _model$maxHeight;
|
|
8142
8053
|
|
|
@@ -8156,26 +8067,30 @@ function SetMaxHeightDlg$1(props) {
|
|
|
8156
8067
|
"aria-label": "close",
|
|
8157
8068
|
className: classes.closeButton,
|
|
8158
8069
|
onClick: handleClose
|
|
8159
|
-
}, /*#__PURE__*/React.createElement(CloseIcon, null))), /*#__PURE__*/React.createElement(DialogContent,
|
|
8070
|
+
}, /*#__PURE__*/React.createElement(CloseIcon, null))), /*#__PURE__*/React.createElement(DialogContent, {
|
|
8160
8071
|
className: classes.root
|
|
8161
|
-
}, /*#__PURE__*/React.createElement(Typography$1, null, "Set max height for the track"), /*#__PURE__*/React.createElement(TextField, {
|
|
8072
|
+
}, /*#__PURE__*/React.createElement(Typography$1, null, "Set max height for the track. For example, you can increase this if the layout says \"Max height reached\""), /*#__PURE__*/React.createElement(TextField, {
|
|
8162
8073
|
value: max,
|
|
8163
8074
|
onChange: function onChange(event) {
|
|
8164
|
-
setMax(event.target.value);
|
|
8075
|
+
return setMax(event.target.value);
|
|
8165
8076
|
},
|
|
8166
8077
|
placeholder: "Enter max score"
|
|
8167
|
-
}), /*#__PURE__*/React.createElement(Button$1, {
|
|
8078
|
+
}), /*#__PURE__*/React.createElement(DialogActions, null, /*#__PURE__*/React.createElement(Button$1, {
|
|
8168
8079
|
variant: "contained",
|
|
8169
8080
|
color: "primary",
|
|
8170
8081
|
type: "submit",
|
|
8171
|
-
|
|
8172
|
-
marginLeft: 20
|
|
8173
|
-
},
|
|
8082
|
+
autoFocus: true,
|
|
8174
8083
|
onClick: function onClick() {
|
|
8175
8084
|
model.setMaxHeight(max !== '' && !Number.isNaN(+max) ? +max : undefined);
|
|
8176
8085
|
handleClose();
|
|
8177
8086
|
}
|
|
8178
|
-
}, "Submit")
|
|
8087
|
+
}, "Submit"), /*#__PURE__*/React.createElement(Button$1, {
|
|
8088
|
+
variant: "contained",
|
|
8089
|
+
color: "secondary",
|
|
8090
|
+
onClick: function onClick() {
|
|
8091
|
+
return handleClose();
|
|
8092
|
+
}
|
|
8093
|
+
}, "Cancel"))));
|
|
8179
8094
|
}
|
|
8180
8095
|
|
|
8181
8096
|
var SetMaxHeight = /*#__PURE__*/observer(SetMaxHeightDlg$1);
|