@jbrowse/plugin-linear-genome-view 1.7.9 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/BaseLinearDisplay/components/BaseLinearDisplay.d.ts +1 -5
- package/dist/BaseLinearDisplay/components/BaseLinearDisplay.js +118 -226
- 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 +145 -175
- package/dist/BaseLinearDisplay/components/ServerSideRenderedBlockContent.js.map +1 -0
- package/dist/BaseLinearDisplay/components/Tooltip.d.ts +8 -0
- package/dist/BaseLinearDisplay/components/Tooltip.js +118 -0
- 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 +20 -15
- package/dist/BaseLinearDisplay/models/BaseLinearDisplayModel.js +605 -683
- 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 +16 -14
- 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 -15
- 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/Header.js +70 -123
- 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 -45
- package/dist/LinearGenomeView/components/HelpDialog.js.map +1 -0
- package/dist/LinearGenomeView/components/ImportForm.js +223 -320
- package/dist/LinearGenomeView/components/ImportForm.js.map +1 -0
- package/dist/LinearGenomeView/components/LinearGenomeView.js +64 -120
- 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 +226 -293
- package/dist/LinearGenomeView/components/OverviewRubberBand.js.map +1 -0
- package/dist/LinearGenomeView/components/OverviewScaleBar.d.ts +24 -8
- package/dist/LinearGenomeView/components/OverviewScaleBar.js +277 -365
- 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 +229 -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 -399
- package/dist/LinearGenomeView/components/ScaleBar.js +121 -167
- package/dist/LinearGenomeView/components/ScaleBar.js.map +1 -0
- package/dist/LinearGenomeView/components/SearchBox.js +158 -205
- 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 -150
- 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.js +116 -156
- package/dist/LinearGenomeView/components/TrackContainer.js.map +1 -0
- package/dist/LinearGenomeView/components/TrackLabel.d.ts +6 -42
- package/dist/LinearGenomeView/components/TrackLabel.js +115 -150
- 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/VerticalGuides.d.ts +2 -3
- package/dist/LinearGenomeView/components/VerticalGuides.js +66 -104
- package/dist/LinearGenomeView/components/VerticalGuides.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.d.ts +12 -0
- package/dist/LinearGenomeView/components/util.js +95 -13
- package/dist/LinearGenomeView/components/util.js.map +1 -0
- package/dist/LinearGenomeView/index.d.ts +6 -11
- package/dist/LinearGenomeView/index.js +1163 -1387
- 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 +101 -51
- package/dist/index.js +225 -284
- 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 +113 -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/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 +67 -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 +194 -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 +198 -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 +9 -0
- package/esm/LinearGenomeView/components/TrackContainer.js +109 -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 +89 -0
- package/esm/LinearGenomeView/components/TrackLabel.js.map +1 -0
- package/esm/LinearGenomeView/components/TracksContainer.d.ts +10 -0
- package/esm/LinearGenomeView/components/TracksContainer.js +142 -0
- package/esm/LinearGenomeView/components/TracksContainer.js.map +1 -0
- package/esm/LinearGenomeView/components/VerticalGuides.d.ts +8 -0
- package/esm/LinearGenomeView/components/VerticalGuides.js +71 -0
- package/esm/LinearGenomeView/components/VerticalGuides.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 +288 -0
- package/esm/LinearGenomeView/index.js +1124 -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 +21 -13
- package/src/BaseLinearDisplay/components/BaseLinearDisplay.tsx +6 -90
- package/src/BaseLinearDisplay/components/Block.tsx +5 -5
- package/src/BaseLinearDisplay/components/LinearBlocks.tsx +4 -4
- package/src/BaseLinearDisplay/components/ServerSideRenderedBlockContent.tsx +7 -8
- package/src/BaseLinearDisplay/components/Tooltip.tsx +107 -0
- package/src/BaseLinearDisplay/models/BaseLinearDisplayModel.tsx +16 -8
- package/src/BaseLinearDisplay/models/serverSideRenderedBlock.ts +1 -1
- package/src/LinearBasicDisplay/components/SetMaxHeight.tsx +10 -7
- package/src/LinearBasicDisplay/model.ts +21 -15
- package/src/LinearGenomeView/components/CenterLine.tsx +6 -11
- package/src/LinearGenomeView/components/ExportSvgDialog.tsx +5 -5
- package/src/LinearGenomeView/components/Header.tsx +12 -16
- package/src/LinearGenomeView/components/HelpDialog.tsx +10 -9
- package/src/LinearGenomeView/components/ImportForm.tsx +24 -37
- package/src/LinearGenomeView/components/LinearGenomeView.test.js +18 -8
- package/src/LinearGenomeView/components/LinearGenomeView.tsx +20 -13
- package/src/LinearGenomeView/components/MiniControls.tsx +29 -40
- package/src/LinearGenomeView/components/OverviewRubberBand.tsx +6 -10
- package/src/LinearGenomeView/components/OverviewScaleBar.tsx +103 -93
- package/src/LinearGenomeView/components/RefNameAutocomplete.tsx +13 -44
- package/src/LinearGenomeView/components/RubberBand.tsx +12 -17
- package/src/LinearGenomeView/components/Ruler.tsx +5 -11
- package/src/LinearGenomeView/components/ScaleBar.tsx +27 -34
- package/src/LinearGenomeView/components/SearchBox.tsx +22 -32
- package/src/LinearGenomeView/components/SearchResultsDialog.tsx +7 -7
- package/src/LinearGenomeView/components/SequenceDialog.tsx +9 -9
- package/src/LinearGenomeView/components/TrackContainer.tsx +12 -12
- package/src/LinearGenomeView/components/TrackLabel.tsx +37 -50
- package/src/LinearGenomeView/components/TracksContainer.tsx +8 -13
- package/src/LinearGenomeView/components/VerticalGuides.tsx +9 -11
- package/src/LinearGenomeView/components/ZoomControls.tsx +12 -13
- package/src/LinearGenomeView/components/__snapshots__/LinearGenomeView.test.js.snap +504 -568
- package/src/LinearGenomeView/components/util.ts +43 -0
- package/src/LinearGenomeView/index.test.ts +21 -5
- package/src/LinearGenomeView/index.tsx +101 -88
- package/src/index.ts +36 -31
- 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/index.test.js +0 -1170
- package/dist/LinearGenomeView/util.test.js +0 -78
|
@@ -1,162 +1,183 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
11
|
-
|
|
12
|
-
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
13
|
-
|
|
14
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
15
|
-
|
|
16
|
-
var _react = require("react");
|
|
17
|
-
|
|
18
|
-
var _configuration = require("@jbrowse/core/configuration");
|
|
19
|
-
|
|
20
|
-
var _util = require("@jbrowse/core/util");
|
|
21
|
-
|
|
22
|
-
var _mobxStateTree = require("mobx-state-tree");
|
|
23
|
-
|
|
24
|
-
var _Visibility = _interopRequireDefault(require("@material-ui/icons/Visibility"));
|
|
25
|
-
|
|
26
|
-
var _BaseLinearDisplay = require("../BaseLinearDisplay");
|
|
27
|
-
|
|
28
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
29
|
-
|
|
30
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
31
|
-
|
|
32
|
-
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); }
|
|
33
|
-
|
|
34
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || (0, _typeof2.default)(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; }
|
|
35
|
-
|
|
36
|
-
var SetMaxHeightDlg = /*#__PURE__*/(0, _react.lazy)(function () {
|
|
37
|
-
return Promise.resolve().then(function () {
|
|
38
|
-
return _interopRequireWildcard(require('./components/SetMaxHeight'));
|
|
39
|
-
});
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
var stateModelFactory = function stateModelFactory(configSchema) {
|
|
43
|
-
return _mobxStateTree.types.compose('LinearBasicDisplay', _BaseLinearDisplay.BaseLinearDisplay, _mobxStateTree.types.model({
|
|
44
|
-
type: _mobxStateTree.types.literal('LinearBasicDisplay'),
|
|
45
|
-
trackShowLabels: _mobxStateTree.types.maybe(_mobxStateTree.types.boolean),
|
|
46
|
-
trackShowDescriptions: _mobxStateTree.types.maybe(_mobxStateTree.types.boolean),
|
|
47
|
-
trackDisplayMode: _mobxStateTree.types.maybe(_mobxStateTree.types.string),
|
|
48
|
-
trackMaxHeight: _mobxStateTree.types.maybe(_mobxStateTree.types.number),
|
|
49
|
-
configuration: (0, _configuration.ConfigurationReference)(configSchema)
|
|
50
|
-
})).views(function (self) {
|
|
51
|
-
return {
|
|
52
|
-
get rendererTypeName() {
|
|
53
|
-
return (0, _configuration.getConf)(self, ['renderer', 'type']);
|
|
54
|
-
},
|
|
55
|
-
|
|
56
|
-
get showLabels() {
|
|
57
|
-
var _self$trackShowLabels;
|
|
58
|
-
|
|
59
|
-
return (_self$trackShowLabels = self.trackShowLabels) !== null && _self$trackShowLabels !== void 0 ? _self$trackShowLabels : (0, _configuration.getConf)(self, ['renderer', 'showLabels']);
|
|
60
|
-
},
|
|
61
|
-
|
|
62
|
-
get showDescriptions() {
|
|
63
|
-
var _self$trackShowDescri;
|
|
64
|
-
|
|
65
|
-
return (_self$trackShowDescri = self.trackShowDescriptions) !== null && _self$trackShowDescri !== void 0 ? _self$trackShowDescri : (0, _configuration.getConf)(self, ['renderer', 'showLabels']);
|
|
66
|
-
},
|
|
67
|
-
|
|
68
|
-
get maxHeight() {
|
|
69
|
-
var _self$trackMaxHeight;
|
|
70
|
-
|
|
71
|
-
return (_self$trackMaxHeight = self.trackMaxHeight) !== null && _self$trackMaxHeight !== void 0 ? _self$trackMaxHeight : (0, _configuration.getConf)(self, ['renderer', 'maxHeight']);
|
|
72
|
-
},
|
|
73
|
-
|
|
74
|
-
get displayMode() {
|
|
75
|
-
var _self$trackDisplayMod;
|
|
76
|
-
|
|
77
|
-
var displayMode = (0, _configuration.getConf)(self, ['renderer', 'displayMode']);
|
|
78
|
-
return (_self$trackDisplayMod = self.trackDisplayMode) !== null && _self$trackDisplayMod !== void 0 ? _self$trackDisplayMod : displayMode;
|
|
79
|
-
},
|
|
80
|
-
|
|
81
|
-
get rendererConfig() {
|
|
82
|
-
var configBlob = (0, _configuration.getConf)(self, ['renderer']) || {};
|
|
83
|
-
return self.rendererType.configSchema.create(_objectSpread(_objectSpread({}, configBlob), {}, {
|
|
84
|
-
showLabels: this.showLabels,
|
|
85
|
-
showDescriptions: this.showDescriptions,
|
|
86
|
-
displayMode: this.displayMode,
|
|
87
|
-
maxHeight: this.maxHeight
|
|
88
|
-
}), (0, _mobxStateTree.getEnv)(self));
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
};
|
|
92
|
-
}).actions(function (self) {
|
|
93
|
-
return {
|
|
94
|
-
toggleShowLabels: function toggleShowLabels() {
|
|
95
|
-
self.trackShowLabels = !self.showLabels;
|
|
96
|
-
},
|
|
97
|
-
toggleShowDescriptions: function toggleShowDescriptions() {
|
|
98
|
-
self.trackShowDescriptions = !self.showDescriptions;
|
|
99
|
-
},
|
|
100
|
-
setDisplayMode: function setDisplayMode(val) {
|
|
101
|
-
self.trackDisplayMode = val;
|
|
102
|
-
},
|
|
103
|
-
setMaxHeight: function setMaxHeight(val) {
|
|
104
|
-
self.trackMaxHeight = val;
|
|
105
|
-
}
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
106
10
|
};
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
+
}
|
|
19
|
+
Object.defineProperty(o, k2, desc);
|
|
20
|
+
}) : (function(o, m, k, k2) {
|
|
21
|
+
if (k2 === undefined) k2 = k;
|
|
22
|
+
o[k2] = m[k];
|
|
23
|
+
}));
|
|
24
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
+
}) : function(o, v) {
|
|
27
|
+
o["default"] = v;
|
|
28
|
+
});
|
|
29
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
30
|
+
if (mod && mod.__esModule) return mod;
|
|
31
|
+
var result = {};
|
|
32
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
33
|
+
__setModuleDefault(result, mod);
|
|
34
|
+
return result;
|
|
35
|
+
};
|
|
36
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
37
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
38
|
+
if (!m) return o;
|
|
39
|
+
var i = m.call(o), r, ar = [], e;
|
|
40
|
+
try {
|
|
41
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
42
|
+
}
|
|
43
|
+
catch (error) { e = { error: error }; }
|
|
44
|
+
finally {
|
|
45
|
+
try {
|
|
46
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
47
|
+
}
|
|
48
|
+
finally { if (e) throw e.error; }
|
|
49
|
+
}
|
|
50
|
+
return ar;
|
|
51
|
+
};
|
|
52
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
53
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
54
|
+
if (ar || !(i in from)) {
|
|
55
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
56
|
+
ar[i] = from[i];
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
60
|
+
};
|
|
61
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
62
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
63
|
+
};
|
|
64
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
65
|
+
var react_1 = require("react");
|
|
66
|
+
var configuration_1 = require("@jbrowse/core/configuration");
|
|
67
|
+
var util_1 = require("@jbrowse/core/util");
|
|
68
|
+
var mobx_state_tree_1 = require("mobx-state-tree");
|
|
69
|
+
// icons
|
|
70
|
+
var Visibility_1 = __importDefault(require("@mui/icons-material/Visibility"));
|
|
71
|
+
// locals
|
|
72
|
+
var BaseLinearDisplay_1 = require("../BaseLinearDisplay");
|
|
73
|
+
var SetMaxHeightDlg = (0, react_1.lazy)(function () { return Promise.resolve().then(function () { return __importStar(require('./components/SetMaxHeight')); }); });
|
|
74
|
+
var stateModelFactory = function (configSchema) {
|
|
75
|
+
return mobx_state_tree_1.types
|
|
76
|
+
.compose('LinearBasicDisplay', BaseLinearDisplay_1.BaseLinearDisplay, mobx_state_tree_1.types.model({
|
|
77
|
+
type: mobx_state_tree_1.types.literal('LinearBasicDisplay'),
|
|
78
|
+
trackShowLabels: mobx_state_tree_1.types.maybe(mobx_state_tree_1.types.boolean),
|
|
79
|
+
trackShowDescriptions: mobx_state_tree_1.types.maybe(mobx_state_tree_1.types.boolean),
|
|
80
|
+
trackDisplayMode: mobx_state_tree_1.types.maybe(mobx_state_tree_1.types.string),
|
|
81
|
+
trackMaxHeight: mobx_state_tree_1.types.maybe(mobx_state_tree_1.types.number),
|
|
82
|
+
configuration: (0, configuration_1.ConfigurationReference)(configSchema),
|
|
83
|
+
}))
|
|
84
|
+
.views(function (self) { return ({
|
|
85
|
+
get rendererTypeName() {
|
|
86
|
+
return (0, configuration_1.getConf)(self, ['renderer', 'type']);
|
|
87
|
+
},
|
|
88
|
+
get showLabels() {
|
|
89
|
+
var _a;
|
|
90
|
+
return (_a = self.trackShowLabels) !== null && _a !== void 0 ? _a : (0, configuration_1.getConf)(self, ['renderer', 'showLabels']);
|
|
91
|
+
},
|
|
92
|
+
get showDescriptions() {
|
|
93
|
+
var _a;
|
|
94
|
+
return ((_a = self.trackShowDescriptions) !== null && _a !== void 0 ? _a : (0, configuration_1.getConf)(self, ['renderer', 'showDescriptions']));
|
|
95
|
+
},
|
|
96
|
+
get maxHeight() {
|
|
97
|
+
var _a;
|
|
98
|
+
return (_a = self.trackMaxHeight) !== null && _a !== void 0 ? _a : (0, configuration_1.getConf)(self, ['renderer', 'maxHeight']);
|
|
99
|
+
},
|
|
100
|
+
get displayMode() {
|
|
101
|
+
var _a;
|
|
102
|
+
return ((_a = self.trackDisplayMode) !== null && _a !== void 0 ? _a : (0, configuration_1.getConf)(self, ['renderer', 'displayMode']));
|
|
103
|
+
},
|
|
104
|
+
}); })
|
|
105
|
+
.views(function (self) { return ({
|
|
106
|
+
get rendererConfig() {
|
|
107
|
+
var configBlob = (0, configuration_1.getConf)(self, ['renderer']) || {};
|
|
108
|
+
var config = configBlob;
|
|
109
|
+
return self.rendererType.configSchema.create(__assign(__assign({}, config), { showLabels: self.showLabels, showDescriptions: self.showDescriptions, displayMode: self.displayMode, maxHeight: self.maxHeight }), (0, mobx_state_tree_1.getEnv)(self));
|
|
110
|
+
},
|
|
111
|
+
}); })
|
|
112
|
+
.actions(function (self) { return ({
|
|
113
|
+
toggleShowLabels: function () {
|
|
114
|
+
self.trackShowLabels = !self.showLabels;
|
|
115
|
+
},
|
|
116
|
+
toggleShowDescriptions: function () {
|
|
117
|
+
self.trackShowDescriptions = !self.showDescriptions;
|
|
118
|
+
},
|
|
119
|
+
setDisplayMode: function (val) {
|
|
120
|
+
self.trackDisplayMode = val;
|
|
121
|
+
},
|
|
122
|
+
setMaxHeight: function (val) {
|
|
123
|
+
self.trackMaxHeight = val;
|
|
124
|
+
},
|
|
125
|
+
}); })
|
|
126
|
+
.views(function (self) {
|
|
127
|
+
var superTrackMenuItems = self.trackMenuItems, superRenderProps = self.renderProps;
|
|
128
|
+
return {
|
|
129
|
+
renderProps: function () {
|
|
130
|
+
var config = self.rendererConfig;
|
|
131
|
+
var superProps = superRenderProps();
|
|
132
|
+
var superPropsOmit = superProps;
|
|
133
|
+
return __assign(__assign({}, superPropsOmit), { config: config });
|
|
134
|
+
},
|
|
135
|
+
trackMenuItems: function () {
|
|
136
|
+
return __spreadArray(__spreadArray([], __read(superTrackMenuItems()), false), [
|
|
137
|
+
{
|
|
138
|
+
label: 'Show labels',
|
|
139
|
+
icon: Visibility_1.default,
|
|
140
|
+
type: 'checkbox',
|
|
141
|
+
checked: self.showLabels,
|
|
142
|
+
onClick: function () {
|
|
143
|
+
self.toggleShowLabels();
|
|
144
|
+
},
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
label: 'Show descriptions',
|
|
148
|
+
icon: Visibility_1.default,
|
|
149
|
+
type: 'checkbox',
|
|
150
|
+
checked: self.showDescriptions,
|
|
151
|
+
onClick: function () { return self.toggleShowDescriptions(); },
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
label: 'Display mode',
|
|
155
|
+
icon: Visibility_1.default,
|
|
156
|
+
subMenu: [
|
|
157
|
+
'compact',
|
|
158
|
+
'reducedRepresentation',
|
|
159
|
+
'normal',
|
|
160
|
+
'collapse',
|
|
161
|
+
].map(function (val) { return ({
|
|
162
|
+
label: val,
|
|
163
|
+
onClick: function () {
|
|
164
|
+
self.setDisplayMode(val);
|
|
165
|
+
},
|
|
166
|
+
}); }),
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
label: 'Set max height',
|
|
170
|
+
onClick: function () {
|
|
171
|
+
(0, util_1.getSession)(self).queueDialog(function (handleClose) { return [
|
|
172
|
+
SetMaxHeightDlg,
|
|
173
|
+
{ model: self, handleClose: handleClose },
|
|
174
|
+
]; });
|
|
175
|
+
},
|
|
176
|
+
},
|
|
177
|
+
], false);
|
|
178
|
+
},
|
|
179
|
+
};
|
|
180
|
+
});
|
|
159
181
|
};
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
exports.default = _default;
|
|
182
|
+
exports.default = stateModelFactory;
|
|
183
|
+
//# sourceMappingURL=model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model.js","sourceRoot":"","sources":["../../src/LinearBasicDisplay/model.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAA4B;AAC5B,6DAIoC;AACpC,2CAA+C;AAE/C,mDAAyD;AAEzD,QAAQ;AACR,8EAA2D;AAE3D,SAAS;AACT,0DAAwD;AAExD,IAAM,eAAe,GAAG,IAAA,YAAI,EAAC,cAAM,wEAAO,2BAA2B,QAAlC,CAAmC,CAAC,CAAA;AAEvE,IAAM,iBAAiB,GAAG,UAAC,YAAwC;IACjE,OAAA,uBAAK;SACF,OAAO,CACN,oBAAoB,EACpB,qCAAiB,EACjB,uBAAK,CAAC,KAAK,CAAC;QACV,IAAI,EAAE,uBAAK,CAAC,OAAO,CAAC,oBAAoB,CAAC;QACzC,eAAe,EAAE,uBAAK,CAAC,KAAK,CAAC,uBAAK,CAAC,OAAO,CAAC;QAC3C,qBAAqB,EAAE,uBAAK,CAAC,KAAK,CAAC,uBAAK,CAAC,OAAO,CAAC;QACjD,gBAAgB,EAAE,uBAAK,CAAC,KAAK,CAAC,uBAAK,CAAC,MAAM,CAAC;QAC3C,cAAc,EAAE,uBAAK,CAAC,KAAK,CAAC,uBAAK,CAAC,MAAM,CAAC;QACzC,aAAa,EAAE,IAAA,sCAAsB,EAAC,YAAY,CAAC;KACpD,CAAC,CACH;SACA,KAAK,CAAC,UAAA,IAAI,IAAI,OAAA,CAAC;QACd,IAAI,gBAAgB;YAClB,OAAO,IAAA,uBAAO,EAAC,IAAI,EAAE,CAAC,UAAU,EAA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EAAE;4BACP,SAAS;4BACT,uBAAuB;4BACvB,QAAQ;4BACR,UAAU;yBACX,CAAC,GAAG,CAAC,UAAA,GAAG,IAAI,OAAA,CAAC;4BACZ,KAAK,EAAE,GAAG;4BACV,OAAO,EAAE;gCACP,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,CAAA;4BAC1B,CAAC;yBACF,CAAC,EALW,CAKX,CAAC;qBACJ;oBACD;wBACE,KAAK,EAAE,gBAAgB;wBACvB,OAAO,EAAE;4BACP,IAAA,iBAAU,EAAC,IAAI,CAAC,CAAC,WAAW,CAAC,UAAA,WAAW,IAAI,OAAA;gCAC1C,eAAe;gCACf,EAAE,KAAK,EAAE,IAAI,EAAE,WAAW,aAAA,EAAE;6BAC7B,EAH2C,CAG3C,CAAC,CAAA;wBACJ,CAAC;qBACF;0BACF;YACH,CAAC;SACF,CAAA;IACH,CAAC,CAAC;AAxIJ,CAwII,CAAA;AAKN,kBAAe,iBAAiB,CAAA"}
|
|
@@ -1,14 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
declare type LGV = Instance<LinearGenomeViewStateModel>;
|
|
2
|
+
import { LinearGenomeViewModel } from '..';
|
|
3
|
+
declare type LGV = LinearGenomeViewModel;
|
|
5
4
|
declare function CenterLine({ model }: {
|
|
6
5
|
model: LGV;
|
|
7
6
|
}): JSX.Element | null;
|
|
8
|
-
declare namespace CenterLine {
|
|
9
|
-
var propTypes: {
|
|
10
|
-
model: import("prop-types").Validator<any>;
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
7
|
declare const _default: typeof CenterLine;
|
|
14
8
|
export default _default;
|
|
@@ -1,80 +1,66 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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]; } };
|
|
7
|
+
}
|
|
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;
|
|
7
17
|
});
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
var
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
var useStyles = (0, _styles.makeStyles)(function () {
|
|
21
|
-
return {
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
var react_1 = __importStar(require("react"));
|
|
27
|
+
var mui_1 = require("tss-react/mui");
|
|
28
|
+
var mobx_react_1 = require("mobx-react");
|
|
29
|
+
var useStyles = (0, mui_1.makeStyles)()(function () { return ({
|
|
22
30
|
centerLineContainer: {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
pointerEvents: 'none'
|
|
31
|
+
background: 'transparent',
|
|
32
|
+
height: '100%',
|
|
33
|
+
zIndex: 5,
|
|
34
|
+
position: 'absolute',
|
|
35
|
+
border: '1px black dashed',
|
|
36
|
+
borderTop: 'none',
|
|
37
|
+
borderBottom: 'none',
|
|
38
|
+
pointerEvents: 'none',
|
|
32
39
|
},
|
|
33
40
|
centerLineText: {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
style: {
|
|
58
|
-
left: "".concat(startingPosition, "px"),
|
|
59
|
-
width: Math.max(1 / bpPerPx, 1)
|
|
60
|
-
}
|
|
61
|
-
}, centerLineInfo && /*#__PURE__*/_react.default.createElement("div", {
|
|
62
|
-
// text that indicates what bp is center, positioned
|
|
63
|
-
// at the bottom right of the center line
|
|
64
|
-
"data-testid": "centerline_text",
|
|
65
|
-
className: classes.centerLineText,
|
|
66
|
-
role: "presentation",
|
|
67
|
-
style: {
|
|
68
|
-
left: Math.max(1 / bpPerPx, 1) + 5,
|
|
69
|
-
top: trackHeights
|
|
70
|
-
}
|
|
71
|
-
}, centerLineInfo.refName, ":", ' ', Math.max(Math.round(centerLineInfo.offset) + 1, 0))) : null;
|
|
41
|
+
position: 'absolute',
|
|
42
|
+
pointerEvents: 'none',
|
|
43
|
+
whiteSpace: 'nowrap',
|
|
44
|
+
fontWeight: 'bold',
|
|
45
|
+
},
|
|
46
|
+
}); });
|
|
47
|
+
function CenterLine(_a) {
|
|
48
|
+
var model = _a.model;
|
|
49
|
+
var bpPerPx = model.bpPerPx, centerLineInfo = model.centerLineInfo, trackHeights = model.trackHeights, tracks = model.tracks, width = model.width;
|
|
50
|
+
var ref = (0, react_1.useRef)(null);
|
|
51
|
+
var classes = useStyles().classes;
|
|
52
|
+
var startingPosition = width / 2;
|
|
53
|
+
return tracks.length ? (react_1.default.createElement("div", { "data-testid": "centerline_container", className: classes.centerLineContainer, role: "presentation", ref: ref, style: {
|
|
54
|
+
left: "".concat(startingPosition, "px"),
|
|
55
|
+
width: Math.max(1 / bpPerPx, 1),
|
|
56
|
+
} }, centerLineInfo && (react_1.default.createElement("div", { "data-testid": "centerline_text", className: classes.centerLineText, role: "presentation", style: {
|
|
57
|
+
left: Math.max(1 / bpPerPx, 1) + 5,
|
|
58
|
+
top: trackHeights,
|
|
59
|
+
} },
|
|
60
|
+
centerLineInfo.refName,
|
|
61
|
+
":",
|
|
62
|
+
' ',
|
|
63
|
+
Math.max(Math.round(centerLineInfo.offset) + 1, 0))))) : null;
|
|
72
64
|
}
|
|
73
|
-
|
|
74
|
-
CenterLine.
|
|
75
|
-
model: _mobxReact.PropTypes.objectOrObservableObject.isRequired
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
var _default = (0, _mobxReact.observer)(CenterLine);
|
|
79
|
-
|
|
80
|
-
exports.default = _default;
|
|
65
|
+
exports.default = (0, mobx_react_1.observer)(CenterLine);
|
|
66
|
+
//# sourceMappingURL=CenterLine.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CenterLine.js","sourceRoot":"","sources":["../../../src/LinearGenomeView/components/CenterLine.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAAqC;AACrC,qCAA0C;AAC1C,yCAAqC;AAKrC,IAAM,SAAS,GAAG,IAAA,gBAAU,GAAE,CAAC,cAAM,OAAA,CAAC;IACpC,mBAAmB,EAAE;QACnB,UAAU,EAAE,aAAa;QACzB,MAAM,EAAE,MAAM;QACd,MAAM,EAAE,CAAC;QACT,QAAQ,EAAE,UAAU;QACpB,MAAM,EAAE,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