@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
|
@@ -1,310 +1,246 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
Object.defineProperty(exports, "__esModule", {
|
|
8
|
-
value: true
|
|
9
|
-
});
|
|
10
|
-
exports.default = void 0;
|
|
11
|
-
|
|
12
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
13
|
-
|
|
14
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
15
|
-
|
|
16
|
-
var _core = require("@material-ui/core");
|
|
17
|
-
|
|
18
|
-
var _util = require("@jbrowse/core/util");
|
|
19
|
-
|
|
20
|
-
var _mobxReact = require("mobx-react");
|
|
21
|
-
|
|
22
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
23
|
-
|
|
24
|
-
var _ = require("..");
|
|
25
|
-
|
|
26
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
27
|
-
|
|
28
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
29
|
-
|
|
30
|
-
var useStyles = (0, _core.makeStyles)(function (theme) {
|
|
31
|
-
var _theme$palette = theme.palette,
|
|
32
|
-
tertiary = _theme$palette.tertiary,
|
|
33
|
-
primary = _theme$palette.primary;
|
|
34
|
-
var background = tertiary ? (0, _core.alpha)(tertiary.main, 0.7) : (0, _core.alpha)(primary.main, 0.7);
|
|
35
|
-
return {
|
|
36
|
-
rubberBand: {
|
|
37
|
-
height: '100%',
|
|
38
|
-
background: background,
|
|
39
|
-
position: 'absolute',
|
|
40
|
-
zIndex: 10,
|
|
41
|
-
textAlign: 'center',
|
|
42
|
-
overflow: 'hidden'
|
|
43
|
-
},
|
|
44
|
-
rubberBandControl: {
|
|
45
|
-
cursor: 'crosshair',
|
|
46
|
-
width: '100%',
|
|
47
|
-
minHeight: 8
|
|
48
|
-
},
|
|
49
|
-
rubberBandText: {
|
|
50
|
-
color: tertiary ? tertiary.contrastText : primary.contrastText
|
|
51
|
-
},
|
|
52
|
-
popover: {
|
|
53
|
-
mouseEvents: 'none',
|
|
54
|
-
cursor: 'crosshair'
|
|
55
|
-
},
|
|
56
|
-
paper: {
|
|
57
|
-
paddingLeft: theme.spacing(1),
|
|
58
|
-
paddingRight: theme.spacing(1)
|
|
59
|
-
},
|
|
60
|
-
guide: {
|
|
61
|
-
pointerEvents: 'none',
|
|
62
|
-
height: '100%',
|
|
63
|
-
width: 1,
|
|
64
|
-
position: 'absolute',
|
|
65
|
-
zIndex: 10
|
|
66
|
-
}
|
|
67
|
-
};
|
|
68
|
-
});
|
|
69
|
-
var HoverTooltip = (0, _mobxReact.observer)(function (_ref) {
|
|
70
|
-
var _assembly$cytobands;
|
|
71
|
-
|
|
72
|
-
var model = _ref.model,
|
|
73
|
-
open = _ref.open,
|
|
74
|
-
guideX = _ref.guideX,
|
|
75
|
-
overview = _ref.overview;
|
|
76
|
-
var classes = useStyles();
|
|
77
|
-
var cytobandOffset = model.cytobandOffset;
|
|
78
|
-
|
|
79
|
-
var _getSession = (0, _util.getSession)(model),
|
|
80
|
-
assemblyManager = _getSession.assemblyManager;
|
|
81
|
-
|
|
82
|
-
var px = overview.pxToBp(guideX - cytobandOffset);
|
|
83
|
-
var assembly = assemblyManager.get(px.assemblyName);
|
|
84
|
-
var cytoband = assembly === null || assembly === void 0 ? void 0 : (_assembly$cytobands = assembly.cytobands) === null || _assembly$cytobands === void 0 ? void 0 : _assembly$cytobands.find(function (f) {
|
|
85
|
-
return px.coord > f.get('start') && px.coord < f.get('end') && px.refName === assembly.getCanonicalRefName(f.get('refName'));
|
|
86
|
-
});
|
|
87
|
-
return /*#__PURE__*/_react.default.createElement(_core.Tooltip, {
|
|
88
|
-
open: open,
|
|
89
|
-
placement: "top",
|
|
90
|
-
title: [(0, _util.stringify)(px), cytoband === null || cytoband === void 0 ? void 0 : cytoband.get('name')].join(' '),
|
|
91
|
-
arrow: true
|
|
92
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
93
|
-
className: classes.guide,
|
|
94
|
-
style: {
|
|
95
|
-
left: guideX
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
96
7
|
}
|
|
97
|
-
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
98
17
|
});
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
var _useState3 = (0, _react.useState)(),
|
|
113
|
-
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
114
|
-
currentX = _useState4[0],
|
|
115
|
-
setCurrentX = _useState4[1];
|
|
116
|
-
|
|
117
|
-
var _useState5 = (0, _react.useState)(),
|
|
118
|
-
_useState6 = (0, _slicedToArray2.default)(_useState5, 2),
|
|
119
|
-
guideX = _useState6[0],
|
|
120
|
-
setGuideX = _useState6[1];
|
|
121
|
-
|
|
122
|
-
var controlsRef = (0, _react.useRef)(null);
|
|
123
|
-
var rubberBandRef = (0, _react.useRef)(null);
|
|
124
|
-
var classes = useStyles();
|
|
125
|
-
var mouseDragging = startX !== undefined;
|
|
126
|
-
(0, _react.useEffect)(function () {
|
|
127
|
-
function globalMouseMove(event) {
|
|
128
|
-
var ref = controlsRef.current;
|
|
129
|
-
|
|
130
|
-
if (ref && mouseDragging) {
|
|
131
|
-
var relativeX = event.clientX - ref.getBoundingClientRect().left;
|
|
132
|
-
setCurrentX(relativeX);
|
|
133
|
-
}
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
26
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
27
|
+
if (!m) return o;
|
|
28
|
+
var i = m.call(o), r, ar = [], e;
|
|
29
|
+
try {
|
|
30
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
134
31
|
}
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
model.zoomToDisplayedRegions(overview.pxToBp(startX - cytobandOffset), overview.pxToBp(currentX - cytobandOffset));
|
|
32
|
+
catch (error) { e = { error: error }; }
|
|
33
|
+
finally {
|
|
34
|
+
try {
|
|
35
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
140
36
|
}
|
|
141
|
-
|
|
142
|
-
/* handling clicking and centering at a specific Bp */
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
if (controlsRef.current && startX !== undefined && currentX === undefined) {
|
|
146
|
-
var clickedAt = overview.pxToBp(startX - cytobandOffset);
|
|
147
|
-
model.centerAt(Math.round(clickedAt.coord), clickedAt.refName, clickedAt.index);
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
setStartX(undefined);
|
|
151
|
-
setCurrentX(undefined);
|
|
152
|
-
|
|
153
|
-
if (startX !== undefined) {
|
|
154
|
-
setGuideX(undefined);
|
|
155
|
-
}
|
|
37
|
+
finally { if (e) throw e.error; }
|
|
156
38
|
}
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
39
|
+
return ar;
|
|
40
|
+
};
|
|
41
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
42
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
43
|
+
};
|
|
44
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
45
|
+
var react_1 = __importStar(require("react"));
|
|
46
|
+
var material_1 = require("@mui/material");
|
|
47
|
+
var mui_1 = require("tss-react/mui");
|
|
48
|
+
var util_1 = require("@jbrowse/core/util");
|
|
49
|
+
var mobx_react_1 = require("mobx-react");
|
|
50
|
+
var prop_types_1 = __importDefault(require("prop-types"));
|
|
51
|
+
var __1 = require("..");
|
|
52
|
+
var useStyles = (0, mui_1.makeStyles)()(function (theme) {
|
|
53
|
+
// @ts-ignore
|
|
54
|
+
var _a = theme.palette, tertiary = _a.tertiary, primary = _a.primary;
|
|
55
|
+
var background = tertiary
|
|
56
|
+
? (0, material_1.alpha)(tertiary.main, 0.7)
|
|
57
|
+
: (0, material_1.alpha)(primary.main, 0.7);
|
|
58
|
+
return {
|
|
59
|
+
rubberBand: {
|
|
60
|
+
height: '100%',
|
|
61
|
+
background: background,
|
|
62
|
+
position: 'absolute',
|
|
63
|
+
zIndex: 10,
|
|
64
|
+
textAlign: 'center',
|
|
65
|
+
overflow: 'hidden',
|
|
66
|
+
},
|
|
67
|
+
rubberBandControl: {
|
|
68
|
+
cursor: 'crosshair',
|
|
69
|
+
width: '100%',
|
|
70
|
+
minHeight: 8,
|
|
71
|
+
},
|
|
72
|
+
rubberBandText: {
|
|
73
|
+
color: tertiary ? tertiary.contrastText : primary.contrastText,
|
|
74
|
+
},
|
|
75
|
+
popover: {
|
|
76
|
+
mouseEvents: 'none',
|
|
77
|
+
cursor: 'crosshair',
|
|
78
|
+
},
|
|
79
|
+
paper: {
|
|
80
|
+
paddingLeft: theme.spacing(1),
|
|
81
|
+
paddingRight: theme.spacing(1),
|
|
82
|
+
},
|
|
83
|
+
guide: {
|
|
84
|
+
pointerEvents: 'none',
|
|
85
|
+
height: '100%',
|
|
86
|
+
width: 1,
|
|
87
|
+
position: 'absolute',
|
|
88
|
+
zIndex: 10,
|
|
89
|
+
},
|
|
90
|
+
};
|
|
91
|
+
});
|
|
92
|
+
var HoverTooltip = (0, mobx_react_1.observer)(function (_a) {
|
|
93
|
+
var _b;
|
|
94
|
+
var model = _a.model, open = _a.open, guideX = _a.guideX, overview = _a.overview;
|
|
95
|
+
var classes = useStyles().classes;
|
|
96
|
+
var cytobandOffset = model.cytobandOffset;
|
|
97
|
+
var assemblyManager = (0, util_1.getSession)(model).assemblyManager;
|
|
98
|
+
var px = overview.pxToBp(guideX - cytobandOffset);
|
|
99
|
+
var assembly = assemblyManager.get(px.assemblyName);
|
|
100
|
+
var cytoband = (_b = assembly === null || assembly === void 0 ? void 0 : assembly.cytobands) === null || _b === void 0 ? void 0 : _b.find(function (f) {
|
|
101
|
+
return px.coord > f.get('start') &&
|
|
102
|
+
px.coord < f.get('end') &&
|
|
103
|
+
px.refName === assembly.getCanonicalRefName(f.get('refName'));
|
|
104
|
+
});
|
|
105
|
+
return (react_1.default.createElement(material_1.Tooltip, { open: open, placement: "top", title: [(0, util_1.stringify)(px), cytoband === null || cytoband === void 0 ? void 0 : cytoband.get('name')].join(' '), arrow: true },
|
|
106
|
+
react_1.default.createElement("div", { className: classes.guide, style: {
|
|
107
|
+
left: guideX,
|
|
108
|
+
} })));
|
|
109
|
+
});
|
|
110
|
+
function OverviewRubberBand(_a) {
|
|
111
|
+
var _b;
|
|
112
|
+
var model = _a.model, overview = _a.overview, _c = _a.ControlComponent, ControlComponent = _c === void 0 ? react_1.default.createElement("div", null) : _c;
|
|
113
|
+
var cytobandOffset = model.cytobandOffset;
|
|
114
|
+
var _d = __read((0, react_1.useState)(), 2), startX = _d[0], setStartX = _d[1];
|
|
115
|
+
var _e = __read((0, react_1.useState)(), 2), currentX = _e[0], setCurrentX = _e[1];
|
|
116
|
+
var _f = __read((0, react_1.useState)(), 2), guideX = _f[0], setGuideX = _f[1];
|
|
117
|
+
var controlsRef = (0, react_1.useRef)(null);
|
|
118
|
+
var rubberBandRef = (0, react_1.useRef)(null);
|
|
119
|
+
var classes = useStyles().classes;
|
|
120
|
+
var mouseDragging = startX !== undefined;
|
|
121
|
+
(0, react_1.useEffect)(function () {
|
|
122
|
+
function globalMouseMove(event) {
|
|
123
|
+
var ref = controlsRef.current;
|
|
124
|
+
if (ref && mouseDragging) {
|
|
125
|
+
var relativeX = event.clientX - ref.getBoundingClientRect().left;
|
|
126
|
+
setCurrentX(relativeX);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
function globalMouseUp() {
|
|
130
|
+
// click and drag
|
|
131
|
+
if (startX !== undefined && currentX !== undefined) {
|
|
132
|
+
if (Math.abs(currentX - startX) > 3) {
|
|
133
|
+
model.moveTo(overview.pxToBp(startX - cytobandOffset), overview.pxToBp(currentX - cytobandOffset));
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
// just a click
|
|
137
|
+
if (startX !== undefined && currentX === undefined) {
|
|
138
|
+
var click = overview.pxToBp(startX - cytobandOffset);
|
|
139
|
+
if (!click.refName) {
|
|
140
|
+
(0, util_1.getSession)(model).notify('unknown position clicked');
|
|
141
|
+
console.error('unknown position clicked', click);
|
|
142
|
+
}
|
|
143
|
+
else {
|
|
144
|
+
model.centerAt(Math.round(click.coord), click.refName, click.index);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
setStartX(undefined);
|
|
148
|
+
setCurrentX(undefined);
|
|
149
|
+
if (startX !== undefined) {
|
|
150
|
+
setGuideX(undefined);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
function globalKeyDown(event) {
|
|
154
|
+
if (event.key === 'Escape') {
|
|
155
|
+
setStartX(undefined);
|
|
156
|
+
setCurrentX(undefined);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
if (mouseDragging) {
|
|
160
|
+
window.addEventListener('mousemove', globalMouseMove, true);
|
|
161
|
+
window.addEventListener('mouseup', globalMouseUp, true);
|
|
162
|
+
window.addEventListener('keydown', globalKeyDown, true);
|
|
163
|
+
return function () {
|
|
164
|
+
window.removeEventListener('mousemove', globalMouseMove, true);
|
|
165
|
+
window.removeEventListener('mouseup', globalMouseUp, true);
|
|
166
|
+
window.removeEventListener('keydown', globalKeyDown, true);
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
return function () { };
|
|
170
|
+
}, [mouseDragging, currentX, startX, model, overview, cytobandOffset]);
|
|
171
|
+
function mouseDown(event) {
|
|
172
|
+
event.preventDefault();
|
|
173
|
+
event.stopPropagation();
|
|
174
|
+
if (controlsRef.current) {
|
|
175
|
+
setStartX(event.clientX - controlsRef.current.getBoundingClientRect().left);
|
|
176
|
+
}
|
|
174
177
|
}
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
function mouseDown(event) {
|
|
180
|
-
event.preventDefault();
|
|
181
|
-
event.stopPropagation();
|
|
182
|
-
|
|
183
|
-
if (controlsRef.current) {
|
|
184
|
-
setStartX(event.clientX - controlsRef.current.getBoundingClientRect().left);
|
|
178
|
+
function mouseMove(event) {
|
|
179
|
+
if (controlsRef.current) {
|
|
180
|
+
setGuideX(event.clientX - controlsRef.current.getBoundingClientRect().left);
|
|
181
|
+
}
|
|
185
182
|
}
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
function mouseMove(event) {
|
|
189
|
-
if (controlsRef.current) {
|
|
190
|
-
setGuideX(event.clientX - controlsRef.current.getBoundingClientRect().left);
|
|
183
|
+
function mouseOut() {
|
|
184
|
+
setGuideX(undefined);
|
|
191
185
|
}
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
if (startX === undefined) {
|
|
199
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
200
|
-
style: {
|
|
201
|
-
position: 'relative'
|
|
202
|
-
}
|
|
203
|
-
}, guideX !== undefined ? /*#__PURE__*/_react.default.createElement(HoverTooltip, {
|
|
204
|
-
model: model,
|
|
205
|
-
open: !mouseDragging,
|
|
206
|
-
overview: overview,
|
|
207
|
-
guideX: guideX
|
|
208
|
-
}) : null, /*#__PURE__*/_react.default.createElement("div", {
|
|
209
|
-
className: classes.rubberBandControl,
|
|
210
|
-
role: "presentation",
|
|
211
|
-
ref: controlsRef,
|
|
212
|
-
onMouseDown: mouseDown,
|
|
213
|
-
onMouseOut: mouseOut,
|
|
214
|
-
onMouseMove: mouseMove
|
|
215
|
-
}, ControlComponent));
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
var left = startX || 0;
|
|
219
|
-
var width = 0;
|
|
220
|
-
|
|
221
|
-
if (startX !== undefined && currentX !== undefined) {
|
|
222
|
-
left = currentX < startX ? currentX : startX;
|
|
223
|
-
width = currentX - startX;
|
|
224
|
-
} // calculate the start and end bp of drag
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
var leftBpOffset;
|
|
228
|
-
var rightBpOffset;
|
|
229
|
-
|
|
230
|
-
if (startX) {
|
|
231
|
-
leftBpOffset = overview.pxToBp(startX - cytobandOffset);
|
|
232
|
-
rightBpOffset = overview.pxToBp(startX + width - cytobandOffset);
|
|
233
|
-
|
|
234
|
-
if (currentX && currentX < startX) {
|
|
235
|
-
;
|
|
236
|
-
var _ref3 = [rightBpOffset, leftBpOffset];
|
|
237
|
-
leftBpOffset = _ref3[0];
|
|
238
|
-
rightBpOffset = _ref3[1];
|
|
186
|
+
if (startX === undefined) {
|
|
187
|
+
return (react_1.default.createElement("div", { style: { position: 'relative' } },
|
|
188
|
+
guideX !== undefined ? (react_1.default.createElement(HoverTooltip, { model: model, open: !mouseDragging, overview: overview, guideX: guideX })) : null,
|
|
189
|
+
react_1.default.createElement("div", { className: classes.rubberBandControl, role: "presentation", ref: controlsRef, onMouseDown: mouseDown, onMouseOut: mouseOut, onMouseMove: mouseMove }, ControlComponent)));
|
|
239
190
|
}
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
191
|
+
var left = startX || 0;
|
|
192
|
+
var width = 0;
|
|
193
|
+
if (startX !== undefined && currentX !== undefined) {
|
|
194
|
+
left = currentX < startX ? currentX : startX;
|
|
195
|
+
width = currentX - startX;
|
|
245
196
|
}
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
},
|
|
257
|
-
transformOrigin: {
|
|
258
|
-
vertical: 'bottom',
|
|
259
|
-
horizontal: 'right'
|
|
260
|
-
},
|
|
261
|
-
keepMounted: true,
|
|
262
|
-
disableRestoreFocus: true
|
|
263
|
-
}, /*#__PURE__*/_react.default.createElement(_core.Typography, null, leftBpOffset ? (0, _util.stringify)(leftBpOffset) : '')), /*#__PURE__*/_react.default.createElement(_core.Popover, {
|
|
264
|
-
className: classes.popover,
|
|
265
|
-
classes: {
|
|
266
|
-
paper: classes.paper
|
|
267
|
-
},
|
|
268
|
-
open: true,
|
|
269
|
-
anchorEl: rubberBandRef.current,
|
|
270
|
-
anchorOrigin: {
|
|
271
|
-
vertical: 'top',
|
|
272
|
-
horizontal: 'right'
|
|
273
|
-
},
|
|
274
|
-
transformOrigin: {
|
|
275
|
-
vertical: 'bottom',
|
|
276
|
-
horizontal: 'left'
|
|
277
|
-
},
|
|
278
|
-
keepMounted: true,
|
|
279
|
-
disableRestoreFocus: true
|
|
280
|
-
}, /*#__PURE__*/_react.default.createElement(_core.Typography, null, rightBpOffset ? (0, _util.stringify)(rightBpOffset) : ''))) : null, /*#__PURE__*/_react.default.createElement("div", {
|
|
281
|
-
ref: rubberBandRef,
|
|
282
|
-
className: classes.rubberBand,
|
|
283
|
-
style: {
|
|
284
|
-
left: left,
|
|
285
|
-
width: Math.abs(width),
|
|
286
|
-
height: _.HEADER_OVERVIEW_HEIGHT
|
|
197
|
+
// calculate the start and end bp of drag
|
|
198
|
+
var leftBpOffset;
|
|
199
|
+
var rightBpOffset;
|
|
200
|
+
if (startX) {
|
|
201
|
+
leftBpOffset = overview.pxToBp(startX - cytobandOffset);
|
|
202
|
+
rightBpOffset = overview.pxToBp(startX + width - cytobandOffset);
|
|
203
|
+
if (currentX && currentX < startX) {
|
|
204
|
+
;
|
|
205
|
+
_b = __read([rightBpOffset, leftBpOffset], 2), leftBpOffset = _b[0], rightBpOffset = _b[1];
|
|
206
|
+
}
|
|
287
207
|
}
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
208
|
+
return (react_1.default.createElement("div", { style: { position: 'relative' } },
|
|
209
|
+
rubberBandRef.current ? (react_1.default.createElement(react_1.default.Fragment, null,
|
|
210
|
+
react_1.default.createElement(material_1.Popover, { className: classes.popover, classes: {
|
|
211
|
+
paper: classes.paper,
|
|
212
|
+
}, open: true, anchorEl: rubberBandRef.current, anchorOrigin: {
|
|
213
|
+
vertical: 'top',
|
|
214
|
+
horizontal: 'left',
|
|
215
|
+
}, transformOrigin: {
|
|
216
|
+
vertical: 'bottom',
|
|
217
|
+
horizontal: 'right',
|
|
218
|
+
}, keepMounted: true, disableRestoreFocus: true },
|
|
219
|
+
react_1.default.createElement(material_1.Typography, null, leftBpOffset ? (0, util_1.stringify)(leftBpOffset) : '')),
|
|
220
|
+
react_1.default.createElement(material_1.Popover, { className: classes.popover, classes: {
|
|
221
|
+
paper: classes.paper,
|
|
222
|
+
}, open: true, anchorEl: rubberBandRef.current, anchorOrigin: {
|
|
223
|
+
vertical: 'top',
|
|
224
|
+
horizontal: 'right',
|
|
225
|
+
}, transformOrigin: {
|
|
226
|
+
vertical: 'bottom',
|
|
227
|
+
horizontal: 'left',
|
|
228
|
+
}, keepMounted: true, disableRestoreFocus: true },
|
|
229
|
+
react_1.default.createElement(material_1.Typography, null, rightBpOffset ? (0, util_1.stringify)(rightBpOffset) : '')))) : null,
|
|
230
|
+
react_1.default.createElement("div", { ref: rubberBandRef, className: classes.rubberBand, style: {
|
|
231
|
+
left: left,
|
|
232
|
+
width: Math.abs(width),
|
|
233
|
+
height: __1.HEADER_OVERVIEW_HEIGHT,
|
|
234
|
+
} }),
|
|
235
|
+
react_1.default.createElement("div", { "data-testid": "rubberBand_controls", className: classes.rubberBandControl, role: "presentation", ref: controlsRef, onMouseDown: mouseDown, onMouseOut: mouseOut, onMouseMove: mouseMove }, ControlComponent)));
|
|
297
236
|
}
|
|
298
|
-
|
|
299
237
|
OverviewRubberBand.propTypes = {
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
238
|
+
model: mobx_react_1.PropTypes.objectOrObservableObject.isRequired,
|
|
239
|
+
overview: mobx_react_1.PropTypes.objectOrObservableObject.isRequired,
|
|
240
|
+
ControlComponent: prop_types_1.default.node,
|
|
303
241
|
};
|
|
304
242
|
OverviewRubberBand.defaultProps = {
|
|
305
|
-
|
|
243
|
+
ControlComponent: react_1.default.createElement("div", null),
|
|
306
244
|
};
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
exports.default = _default;
|
|
245
|
+
exports.default = (0, mobx_react_1.observer)(OverviewRubberBand);
|
|
246
|
+
//# sourceMappingURL=OverviewRubberBand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OverviewRubberBand.js","sourceRoot":"","sources":["../../../src/LinearGenomeView/components/OverviewRubberBand.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA0D;AAC1D,0CAAmE;AACnE,qCAA0C;AAC1C,2CAA0D;AAC1D,yCAAiE;AACjE,0DAAuC;AAEvC,wBAAkE;AAIlE,IAAM,SAAS,GAAG,IAAA,gBAAU,GAAE,CAAC,UAAA,KAAK;IAClC,aAAa;IACP,IAAA,KAAwB,KAAK,CAAC,OAAO,EAAnC,QAAQ,cAAA,EAAE,OAAO,aAAkB,CAAA;IAC3C,IAAM,UAAU,GAAG,QAAQ;QACzB,CAAC,CAAC,IAAA,gBAAK,EAAC,QAAQ,CAAC,IAAI,EAAE,GAAG,CAAC;QAC3B,CAAC,CAAC,IAAA,gBAAK,EAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;IAC5B,OAAO;QACL,UAAU,EAAE;YACV,MAAM,EAAE,MAAM;YACd,UAAU,YAAA;YACV,QAAQ,EAAE,UAAU;YACpB,MAAM,EAAE,EAAE;YACV,SAAS,EAAE,QAAQ;YACnB,QAAQ,EAAE,QAAQ;SACnB;QACD,iBAAiB,EAAE;YACjB,MAAM,EAAE,WAAW;YACnB,KAAK,EAAE,MAAM;YACb,SAAS,EAAE,CAAC;SACb;QACD,cAAc,EAAE;YACd,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,CAAC,OAAO,CAAC,YAAY;SAC/D;QACD,OAAO,EAAE;YACP,WAAW,EAAE,MAAM;YACnB,MAAM,EAAE,WAAW;SACpB;QACD,KA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B,WAAW,EAAE,SAAS,EACtB,UAAU,EAAE,QAAQ,EACpB,WAAW,EAAE,SAAS,IAErB,gBAAgB,CACb,CACF,CACP,CAAA;AACH,CAAC;AAED,kBAAkB,CAAC,SAAS,GAAG;IAC7B,KAAK,EAAE,sBAAa,CAAC,wBAAwB,CAAC,UAAU;IACxD,QAAQ,EAAE,sBAAa,CAAC,wBAAwB,CAAC,UAAU;IAC3D,gBAAgB,EAAE,oBAAc,CAAC,IAAI;CACtC,CAAA;AAED,kBAAkB,CAAC,YAAY,GAAG;IAChC,gBAAgB,EAAE,0CAAO;CAC1B,CAAA;AAED,kBAAe,IAAA,qBAAQ,EAAC,kBAAkB,CAAC,CAAA"}
|
|
@@ -12,9 +12,9 @@ declare const Polygon: ({ model, overview, useOffset, }: {
|
|
|
12
12
|
declare type LGV = LinearGenomeViewModel;
|
|
13
13
|
declare const Cytobands: ({ overview, block, assembly, }: {
|
|
14
14
|
overview: Base1DViewModel;
|
|
15
|
-
assembly?: (
|
|
16
|
-
configuration:
|
|
17
|
-
}
|
|
15
|
+
assembly?: ({
|
|
16
|
+
configuration: any;
|
|
17
|
+
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
18
18
|
error: Error | undefined;
|
|
19
19
|
regions: import("@jbrowse/core/assemblyManager/assembly").BasicRegion[] | undefined;
|
|
20
20
|
refNameAliases: {
|