@jbrowse/plugin-linear-comparative-view 3.7.0 → 4.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/esm/LGVSyntenyDisplay/components/LaunchSyntenyViewDialog.js +3 -3
- package/esm/LGVSyntenyDisplay/configSchemaF.d.ts +9 -9
- package/esm/LGVSyntenyDisplay/configSchemaF.js +1 -1
- package/esm/LGVSyntenyDisplay/index.js +2 -2
- package/esm/LGVSyntenyDisplay/model.d.ts +1179 -133
- package/esm/LGVSyntenyDisplay/model.js +2 -2
- package/esm/LaunchLinearSyntenyView.js +13 -86
- package/esm/LinearComparativeDisplay/configSchemaF.d.ts +1 -1
- package/esm/LinearComparativeDisplay/index.js +2 -2
- package/esm/LinearComparativeDisplay/stateModelFactory.d.ts +95 -135
- package/esm/LinearComparativeDisplay/stateModelFactory.js +18 -17
- package/esm/LinearComparativeView/components/ColorBySelector.d.ts +1 -1
- package/esm/LinearComparativeView/components/ColorBySelector.js +3 -4
- package/esm/LinearComparativeView/components/Header.d.ts +1 -1
- package/esm/LinearComparativeView/components/Header.js +8 -9
- package/esm/LinearComparativeView/components/HeaderSearchBoxes.js +2 -2
- package/esm/LinearComparativeView/components/LinearComparativeRenderArea.d.ts +1 -1
- package/esm/LinearComparativeView/components/LinearComparativeRenderArea.js +9 -8
- package/esm/LinearComparativeView/components/LinearComparativeView.d.ts +1 -1
- package/esm/LinearComparativeView/components/LinearComparativeView.js +5 -5
- package/esm/LinearComparativeView/components/MinLengthSlider.d.ts +1 -1
- package/esm/LinearComparativeView/components/MinLengthSlider.js +7 -7
- package/esm/LinearComparativeView/components/OpacitySlider.d.ts +1 -1
- package/esm/LinearComparativeView/components/OpacitySlider.js +5 -6
- package/esm/LinearComparativeView/components/Rubberband.d.ts +1 -1
- package/esm/LinearComparativeView/components/Rubberband.js +5 -5
- package/esm/LinearComparativeView/components/RubberbandSpan.js +3 -5
- package/esm/LinearComparativeView/components/VerticalGuide.d.ts +1 -1
- package/esm/LinearComparativeView/components/VerticalGuide.js +2 -2
- package/esm/LinearComparativeView/components/useRangeSelect.d.ts +1 -1
- package/esm/LinearComparativeView/components/useRangeSelect.js +1 -1
- package/esm/LinearComparativeView/components/util.js +1 -1
- package/esm/LinearComparativeView/index.js +2 -2
- package/esm/LinearComparativeView/model.d.ts +474 -222
- package/esm/LinearComparativeView/model.js +50 -29
- package/esm/LinearReadVsRef/LinearReadVsRef.js +8 -9
- package/esm/LinearReadVsRef/index.js +1 -1
- package/esm/LinearSyntenyDisplay/afterAttach.d.ts +1 -1
- package/esm/LinearSyntenyDisplay/afterAttach.js +10 -11
- package/esm/LinearSyntenyDisplay/components/BlockError.js +1 -1
- package/esm/LinearSyntenyDisplay/components/BlockMessage.js +6 -15
- package/esm/LinearSyntenyDisplay/components/Component.d.ts +1 -1
- package/esm/LinearSyntenyDisplay/components/Component.js +5 -5
- package/esm/LinearSyntenyDisplay/components/LinearSyntenyRendering.d.ts +1 -1
- package/esm/LinearSyntenyDisplay/components/LinearSyntenyRendering.js +10 -14
- package/esm/LinearSyntenyDisplay/components/LoadingMessage.js +1 -1
- package/esm/LinearSyntenyDisplay/components/SyntenyContextMenu.d.ts +1 -1
- package/esm/LinearSyntenyDisplay/components/SyntenyContextMenu.js +8 -33
- package/esm/LinearSyntenyDisplay/components/SyntenyTooltip.d.ts +1 -1
- package/esm/LinearSyntenyDisplay/components/SyntenyTooltip.js +1 -1
- package/esm/LinearSyntenyDisplay/components/util.d.ts +2 -2
- package/esm/LinearSyntenyDisplay/components/util.js +3 -3
- package/esm/LinearSyntenyDisplay/configSchemaF.d.ts +2 -2
- package/esm/LinearSyntenyDisplay/configSchemaF.js +1 -1
- package/esm/LinearSyntenyDisplay/drawMouseoverClickMap.d.ts +2 -0
- package/esm/LinearSyntenyDisplay/drawMouseoverClickMap.js +53 -0
- package/esm/LinearSyntenyDisplay/drawSynteny.d.ts +1 -1
- package/esm/LinearSyntenyDisplay/drawSynteny.js +3 -5
- package/esm/LinearSyntenyDisplay/index.js +3 -3
- package/esm/LinearSyntenyDisplay/model.d.ts +97 -137
- package/esm/LinearSyntenyDisplay/model.js +3 -3
- package/esm/LinearSyntenyView/components/DiagonalizationProgressDialog.d.ts +1 -1
- package/esm/LinearSyntenyView/components/DiagonalizationProgressDialog.js +2 -2
- package/esm/LinearSyntenyView/components/ExportSvgDialog.d.ts +1 -1
- package/esm/LinearSyntenyView/components/ExportSvgDialog.js +6 -2
- package/esm/LinearSyntenyView/components/ImportForm/ImportSyntenyOpenCustomTrack.d.ts +1 -1
- package/esm/LinearSyntenyView/components/ImportForm/ImportSyntenyOpenCustomTrack.js +4 -4
- package/esm/LinearSyntenyView/components/ImportForm/ImportSyntenyPreConfigured.d.ts +1 -1
- package/esm/LinearSyntenyView/components/ImportForm/ImportSyntenyPreConfigured.js +4 -5
- package/esm/LinearSyntenyView/components/ImportForm/ImportSyntenyTrackSelectorArea.d.ts +11 -1
- package/esm/LinearSyntenyView/components/ImportForm/ImportSyntenyTrackSelectorArea.js +8 -4
- package/esm/LinearSyntenyView/components/ImportForm/LeftPanel.d.ts +1 -1
- package/esm/LinearSyntenyView/components/ImportForm/LeftPanel.js +26 -9
- package/esm/LinearSyntenyView/components/ImportForm/LinearSyntenyImportForm.d.ts +1 -1
- package/esm/LinearSyntenyView/components/ImportForm/LinearSyntenyImportForm.js +5 -5
- package/esm/LinearSyntenyView/components/ImportForm/doSubmit.d.ts +1 -1
- package/esm/LinearSyntenyView/components/ImportForm/doSubmit.js +1 -2
- package/esm/LinearSyntenyView/components/ImportForm/selectors/AnchorsSelector.d.ts +1 -1
- package/esm/LinearSyntenyView/components/ImportForm/selectors/AnchorsSelector.js +2 -2
- package/esm/LinearSyntenyView/components/ImportForm/selectors/PifGzSelector.d.ts +1 -1
- package/esm/LinearSyntenyView/components/ImportForm/selectors/PifGzSelector.js +2 -2
- package/esm/LinearSyntenyView/components/ImportForm/selectors/StandardFormatSelector.d.ts +1 -1
- package/esm/LinearSyntenyView/components/ImportForm/selectors/StandardFormatSelector.js +3 -3
- package/esm/LinearSyntenyView/components/ImportForm/selectors/SwapAssemblies.js +3 -3
- package/esm/LinearSyntenyView/components/ImportForm/selectors/index.d.ts +4 -4
- package/esm/LinearSyntenyView/components/ImportForm/selectors/index.js +4 -4
- package/esm/LinearSyntenyView/components/LinearSyntenyView.d.ts +1 -1
- package/esm/LinearSyntenyView/components/LinearSyntenyView.js +14 -4
- package/esm/LinearSyntenyView/index.js +2 -2
- package/esm/LinearSyntenyView/model.d.ts +522 -254
- package/esm/LinearSyntenyView/model.js +99 -15
- package/esm/LinearSyntenyView/svgcomponents/SVGLinearGenomeView.d.ts +3 -1
- package/esm/LinearSyntenyView/svgcomponents/SVGLinearGenomeView.js +3 -3
- package/esm/LinearSyntenyView/svgcomponents/SVGLinearSyntenyView.d.ts +2 -2
- package/esm/LinearSyntenyView/svgcomponents/SVGLinearSyntenyView.js +34 -31
- package/esm/LinearSyntenyView/types.d.ts +10 -1
- package/esm/LinearSyntenyViewHelper/index.js +1 -1
- package/esm/LinearSyntenyViewHelper/stateModelFactory.d.ts +11 -11
- package/esm/LinearSyntenyViewHelper/stateModelFactory.js +5 -43
- package/esm/SyntenyFeatureDetail/Formatter.js +2 -2
- package/esm/SyntenyFeatureDetail/LinkToSyntenyView.d.ts +1 -1
- package/esm/SyntenyFeatureDetail/LinkToSyntenyView.js +6 -7
- package/esm/SyntenyFeatureDetail/SyntenyFeatureDetail.d.ts +1 -1
- package/esm/SyntenyFeatureDetail/SyntenyFeatureDetail.js +3 -3
- package/esm/SyntenyFeatureDetail/index.js +2 -2
- package/esm/SyntenyTrack/configSchema.d.ts +16 -11
- package/esm/SyntenyTrack/index.js +1 -1
- package/esm/index.d.ts +2 -0
- package/esm/index.js +11 -14
- package/esm/util.d.ts +1 -1
- package/esm/util.js +4 -8
- package/package.json +29 -35
- package/dist/LGVSyntenyDisplay/components/LaunchSyntenyViewDialog.d.ts +0 -9
- package/dist/LGVSyntenyDisplay/components/LaunchSyntenyViewDialog.js +0 -53
- package/dist/LGVSyntenyDisplay/components/util.d.ts +0 -14
- package/dist/LGVSyntenyDisplay/components/util.js +0 -100
- package/dist/LGVSyntenyDisplay/configSchemaF.d.ts +0 -66
- package/dist/LGVSyntenyDisplay/configSchemaF.js +0 -38
- package/dist/LGVSyntenyDisplay/index.d.ts +0 -2
- package/dist/LGVSyntenyDisplay/index.js +0 -24
- package/dist/LGVSyntenyDisplay/model.d.ts +0 -418
- package/dist/LGVSyntenyDisplay/model.js +0 -118
- package/dist/LaunchLinearSyntenyView.d.ts +0 -2
- package/dist/LaunchLinearSyntenyView.js +0 -93
- package/dist/LinearComparativeDisplay/configSchemaF.d.ts +0 -2
- package/dist/LinearComparativeDisplay/configSchemaF.js +0 -10
- package/dist/LinearComparativeDisplay/index.d.ts +0 -2
- package/dist/LinearComparativeDisplay/index.js +0 -24
- package/dist/LinearComparativeDisplay/stateModelFactory.d.ts +0 -243
- package/dist/LinearComparativeDisplay/stateModelFactory.js +0 -146
- package/dist/LinearComparativeView/components/ColorBySelector.d.ts +0 -5
- package/dist/LinearComparativeView/components/ColorBySelector.js +0 -54
- package/dist/LinearComparativeView/components/Header.d.ts +0 -5
- package/dist/LinearComparativeView/components/Header.js +0 -87
- package/dist/LinearComparativeView/components/HeaderSearchBoxes.d.ts +0 -5
- package/dist/LinearComparativeView/components/HeaderSearchBoxes.js +0 -24
- package/dist/LinearComparativeView/components/LinearComparativeRenderArea.d.ts +0 -5
- package/dist/LinearComparativeView/components/LinearComparativeRenderArea.js +0 -46
- package/dist/LinearComparativeView/components/LinearComparativeView.d.ts +0 -5
- package/dist/LinearComparativeView/components/LinearComparativeView.js +0 -30
- package/dist/LinearComparativeView/components/MinLengthSlider.d.ts +0 -5
- package/dist/LinearComparativeView/components/MinLengthSlider.js +0 -47
- package/dist/LinearComparativeView/components/OpacitySlider.d.ts +0 -5
- package/dist/LinearComparativeView/components/OpacitySlider.js +0 -46
- package/dist/LinearComparativeView/components/Rubberband.d.ts +0 -7
- package/dist/LinearComparativeView/components/Rubberband.js +0 -32
- package/dist/LinearComparativeView/components/RubberbandSpan.d.ts +0 -15
- package/dist/LinearComparativeView/components/RubberbandSpan.js +0 -38
- package/dist/LinearComparativeView/components/RubberbandTooltip.d.ts +0 -5
- package/dist/LinearComparativeView/components/RubberbandTooltip.js +0 -20
- package/dist/LinearComparativeView/components/SliderTooltip.d.ts +0 -2
- package/dist/LinearComparativeView/components/SliderTooltip.js +0 -9
- package/dist/LinearComparativeView/components/VerticalGuide.d.ts +0 -7
- package/dist/LinearComparativeView/components/VerticalGuide.js +0 -26
- package/dist/LinearComparativeView/components/useRangeSelect.d.ts +0 -59
- package/dist/LinearComparativeView/components/useRangeSelect.js +0 -124
- package/dist/LinearComparativeView/components/util.d.ts +0 -4
- package/dist/LinearComparativeView/components/util.js +0 -6
- package/dist/LinearComparativeView/index.d.ts +0 -2
- package/dist/LinearComparativeView/index.js +0 -55
- package/dist/LinearComparativeView/model.d.ts +0 -606
- package/dist/LinearComparativeView/model.js +0 -238
- package/dist/LinearReadVsRef/LinearReadVsRef.d.ts +0 -6
- package/dist/LinearReadVsRef/LinearReadVsRef.js +0 -241
- package/dist/LinearReadVsRef/index.d.ts +0 -2
- package/dist/LinearReadVsRef/index.js +0 -86
- package/dist/LinearSyntenyDisplay/afterAttach.d.ts +0 -2
- package/dist/LinearSyntenyDisplay/afterAttach.js +0 -104
- package/dist/LinearSyntenyDisplay/components/BlockError.d.ts +0 -3
- package/dist/LinearSyntenyDisplay/components/BlockError.js +0 -16
- package/dist/LinearSyntenyDisplay/components/BlockMessage.d.ts +0 -3
- package/dist/LinearSyntenyDisplay/components/BlockMessage.js +0 -24
- package/dist/LinearSyntenyDisplay/components/Component.d.ts +0 -5
- package/dist/LinearSyntenyDisplay/components/Component.js +0 -26
- package/dist/LinearSyntenyDisplay/components/LinearSyntenyRendering.d.ts +0 -5
- package/dist/LinearSyntenyDisplay/components/LinearSyntenyRendering.js +0 -223
- package/dist/LinearSyntenyDisplay/components/LoadingMessage.d.ts +0 -3
- package/dist/LinearSyntenyDisplay/components/LoadingMessage.js +0 -21
- package/dist/LinearSyntenyDisplay/components/SyntenyContextMenu.d.ts +0 -15
- package/dist/LinearSyntenyDisplay/components/SyntenyContextMenu.js +0 -56
- package/dist/LinearSyntenyDisplay/components/SyntenyTooltip.d.ts +0 -4
- package/dist/LinearSyntenyDisplay/components/SyntenyTooltip.js +0 -13
- package/dist/LinearSyntenyDisplay/components/util.d.ts +0 -45
- package/dist/LinearSyntenyDisplay/components/util.js +0 -199
- package/dist/LinearSyntenyDisplay/configSchemaF.d.ts +0 -12
- package/dist/LinearSyntenyDisplay/configSchemaF.js +0 -23
- package/dist/LinearSyntenyDisplay/drawSynteny.d.ts +0 -6
- package/dist/LinearSyntenyDisplay/drawSynteny.js +0 -470
- package/dist/LinearSyntenyDisplay/index.d.ts +0 -2
- package/dist/LinearSyntenyDisplay/index.js +0 -56
- package/dist/LinearSyntenyDisplay/model.d.ts +0 -291
- package/dist/LinearSyntenyDisplay/model.js +0 -133
- package/dist/LinearSyntenyView/components/DiagonalizationProgressDialog.d.ts +0 -6
- package/dist/LinearSyntenyView/components/DiagonalizationProgressDialog.js +0 -87
- package/dist/LinearSyntenyView/components/ExportSvgDialog.d.ts +0 -7
- package/dist/LinearSyntenyView/components/ExportSvgDialog.js +0 -58
- package/dist/LinearSyntenyView/components/Icons.d.ts +0 -3
- package/dist/LinearSyntenyView/components/Icons.js +0 -12
- package/dist/LinearSyntenyView/components/ImportForm/ImportSyntenyOpenCustomTrack.d.ts +0 -8
- package/dist/LinearSyntenyView/components/ImportForm/ImportSyntenyOpenCustomTrack.js +0 -81
- package/dist/LinearSyntenyView/components/ImportForm/ImportSyntenyPreConfigured.d.ts +0 -8
- package/dist/LinearSyntenyView/components/ImportForm/ImportSyntenyPreConfigured.js +0 -39
- package/dist/LinearSyntenyView/components/ImportForm/ImportSyntenyTrackSelectorArea.d.ts +0 -7
- package/dist/LinearSyntenyView/components/ImportForm/ImportSyntenyTrackSelectorArea.js +0 -22
- package/dist/LinearSyntenyView/components/ImportForm/LeftPanel.d.ts +0 -11
- package/dist/LinearSyntenyView/components/ImportForm/LeftPanel.js +0 -58
- package/dist/LinearSyntenyView/components/ImportForm/LinearSyntenyImportForm.d.ts +0 -5
- package/dist/LinearSyntenyView/components/ImportForm/LinearSyntenyImportForm.js +0 -60
- package/dist/LinearSyntenyView/components/ImportForm/doSubmit.d.ts +0 -5
- package/dist/LinearSyntenyView/components/ImportForm/doSubmit.js +0 -43
- package/dist/LinearSyntenyView/components/ImportForm/getAdapter.d.ts +0 -117
- package/dist/LinearSyntenyView/components/ImportForm/getAdapter.js +0 -68
- package/dist/LinearSyntenyView/components/ImportForm/selectors/AnchorsSelector.d.ts +0 -3
- package/dist/LinearSyntenyView/components/ImportForm/selectors/AnchorsSelector.js +0 -13
- package/dist/LinearSyntenyView/components/ImportForm/selectors/PifGzSelector.d.ts +0 -3
- package/dist/LinearSyntenyView/components/ImportForm/selectors/PifGzSelector.js +0 -13
- package/dist/LinearSyntenyView/components/ImportForm/selectors/SelectorTypes.d.ts +0 -19
- package/dist/LinearSyntenyView/components/ImportForm/selectors/SelectorTypes.js +0 -10
- package/dist/LinearSyntenyView/components/ImportForm/selectors/StandardFormatSelector.d.ts +0 -3
- package/dist/LinearSyntenyView/components/ImportForm/selectors/StandardFormatSelector.js +0 -20
- package/dist/LinearSyntenyView/components/ImportForm/selectors/SwapAssemblies.d.ts +0 -13
- package/dist/LinearSyntenyView/components/ImportForm/selectors/SwapAssemblies.js +0 -32
- package/dist/LinearSyntenyView/components/ImportForm/selectors/index.d.ts +0 -4
- package/dist/LinearSyntenyView/components/ImportForm/selectors/index.js +0 -27
- package/dist/LinearSyntenyView/components/ImportForm/util.d.ts +0 -10
- package/dist/LinearSyntenyView/components/ImportForm/util.js +0 -24
- package/dist/LinearSyntenyView/components/LinearSyntenyView.d.ts +0 -5
- package/dist/LinearSyntenyView/components/LinearSyntenyView.js +0 -47
- package/dist/LinearSyntenyView/components/TextField2.d.ts +0 -2
- package/dist/LinearSyntenyView/components/TextField2.js +0 -8
- package/dist/LinearSyntenyView/index.d.ts +0 -2
- package/dist/LinearSyntenyView/index.js +0 -52
- package/dist/LinearSyntenyView/model.d.ts +0 -702
- package/dist/LinearSyntenyView/model.js +0 -240
- package/dist/LinearSyntenyView/svgcomponents/SVGBackground.d.ts +0 -5
- package/dist/LinearSyntenyView/svgcomponents/SVGBackground.js +0 -10
- package/dist/LinearSyntenyView/svgcomponents/SVGLinearGenomeView.d.ts +0 -11
- package/dist/LinearSyntenyView/svgcomponents/SVGLinearGenomeView.js +0 -11
- package/dist/LinearSyntenyView/svgcomponents/SVGLinearSyntenyView.d.ts +0 -3
- package/dist/LinearSyntenyView/svgcomponents/SVGLinearSyntenyView.js +0 -80
- package/dist/LinearSyntenyView/types.d.ts +0 -29
- package/dist/LinearSyntenyView/types.js +0 -2
- package/dist/LinearSyntenyView/util/diagonalize.d.ts +0 -27
- package/dist/LinearSyntenyView/util/diagonalize.js +0 -91
- package/dist/LinearSyntenyViewHelper/index.d.ts +0 -2
- package/dist/LinearSyntenyViewHelper/index.js +0 -25
- package/dist/LinearSyntenyViewHelper/stateModelFactory.d.ts +0 -18
- package/dist/LinearSyntenyViewHelper/stateModelFactory.js +0 -78
- package/dist/SyntenyFeatureDetail/Formatter.d.ts +0 -3
- package/dist/SyntenyFeatureDetail/Formatter.js +0 -23
- package/dist/SyntenyFeatureDetail/LinkToSyntenyView.d.ts +0 -7
- package/dist/SyntenyFeatureDetail/LinkToSyntenyView.js +0 -87
- package/dist/SyntenyFeatureDetail/SyntenyFeatureDetail.d.ts +0 -5
- package/dist/SyntenyFeatureDetail/SyntenyFeatureDetail.js +0 -19
- package/dist/SyntenyFeatureDetail/index.d.ts +0 -2
- package/dist/SyntenyFeatureDetail/index.js +0 -60
- package/dist/SyntenyFeatureDetail/types.d.ts +0 -9
- package/dist/SyntenyFeatureDetail/types.js +0 -2
- package/dist/SyntenyTrack/configSchema.d.ts +0 -80
- package/dist/SyntenyTrack/configSchema.js +0 -9
- package/dist/SyntenyTrack/index.d.ts +0 -2
- package/dist/SyntenyTrack/index.js +0 -19
- package/dist/index.d.ts +0 -7
- package/dist/index.js +0 -48
- package/dist/util.d.ts +0 -25
- package/dist/util.js +0 -67
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
-
const mobx_react_1 = require("mobx-react");
|
|
8
|
-
const mui_1 = require("tss-react/mui");
|
|
9
|
-
const Header_1 = __importDefault(require("./Header"));
|
|
10
|
-
const LinearComparativeRenderArea_1 = __importDefault(require("./LinearComparativeRenderArea"));
|
|
11
|
-
const Rubberband_1 = __importDefault(require("./Rubberband"));
|
|
12
|
-
const useStyles = (0, mui_1.makeStyles)()(theme => ({
|
|
13
|
-
rubberbandContainer: {
|
|
14
|
-
position: 'relative',
|
|
15
|
-
overflow: 'hidden',
|
|
16
|
-
},
|
|
17
|
-
rubberbandDiv: {
|
|
18
|
-
width: '100%',
|
|
19
|
-
background: theme.palette.action.disabledBackground,
|
|
20
|
-
height: 15,
|
|
21
|
-
'&:hover': {
|
|
22
|
-
background: theme.palette.action.selected,
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
}));
|
|
26
|
-
const LinearComparativeView = (0, mobx_react_1.observer)(function ({ model, }) {
|
|
27
|
-
const { classes } = useStyles();
|
|
28
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: classes.rubberbandContainer, children: [(0, jsx_runtime_1.jsx)(Header_1.default, { model: model }), (0, jsx_runtime_1.jsx)(Rubberband_1.default, { model: model, ControlComponent: (0, jsx_runtime_1.jsx)("div", { className: classes.rubberbandDiv }) }), (0, jsx_runtime_1.jsx)(LinearComparativeRenderArea_1.default, { model: model })] }));
|
|
29
|
-
});
|
|
30
|
-
exports.default = LinearComparativeView;
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
-
const react_1 = require("react");
|
|
8
|
-
const material_1 = require("@mui/material");
|
|
9
|
-
const mobx_react_1 = require("mobx-react");
|
|
10
|
-
const mui_1 = require("tss-react/mui");
|
|
11
|
-
const SliderTooltip_1 = __importDefault(require("./SliderTooltip"));
|
|
12
|
-
const useStyles = (0, mui_1.makeStyles)()({
|
|
13
|
-
container: {
|
|
14
|
-
display: 'flex',
|
|
15
|
-
alignItems: 'center',
|
|
16
|
-
marginLeft: 16,
|
|
17
|
-
marginRight: 16,
|
|
18
|
-
minWidth: 150,
|
|
19
|
-
},
|
|
20
|
-
});
|
|
21
|
-
const MinLengthSlider = (0, mobx_react_1.observer)(function ({ model, }) {
|
|
22
|
-
var _a, _b, _c;
|
|
23
|
-
const { classes } = useStyles();
|
|
24
|
-
const { levels } = model;
|
|
25
|
-
const firstDisplay = (_b = (_a = levels[0]) === null || _a === void 0 ? void 0 : _a.tracks[0]) === null || _b === void 0 ? void 0 : _b.displays[0];
|
|
26
|
-
const minAlignmentLength = (_c = firstDisplay === null || firstDisplay === void 0 ? void 0 : firstDisplay.minAlignmentLength) !== null && _c !== void 0 ? _c : 0;
|
|
27
|
-
const [minLengthValue, setMinLengthValue] = (0, react_1.useState)(Math.log2(Math.max(1, minAlignmentLength)) * 100);
|
|
28
|
-
(0, react_1.useEffect)(() => {
|
|
29
|
-
setMinLengthValue(Math.log2(Math.max(1, minAlignmentLength)) * 100);
|
|
30
|
-
}, [minAlignmentLength]);
|
|
31
|
-
return ((0, jsx_runtime_1.jsxs)(material_1.Box, { className: classes.container, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", style: { marginRight: 8 }, children: "Min length:" }), (0, jsx_runtime_1.jsx)(material_1.Slider, { value: minLengthValue, onChange: (_, val) => {
|
|
32
|
-
setMinLengthValue(val);
|
|
33
|
-
}, onChangeCommitted: () => {
|
|
34
|
-
const newMinLength = Math.round(2 ** (minLengthValue / 100));
|
|
35
|
-
for (const level of levels) {
|
|
36
|
-
for (const track of level.tracks) {
|
|
37
|
-
for (const display of track.displays) {
|
|
38
|
-
;
|
|
39
|
-
display.setMinAlignmentLength(newMinLength);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}, min: 0, max: Math.log2(1000000) * 100, valueLabelDisplay: "auto", valueLabelFormat: newValue => Math.round(2 ** (newValue / 100)).toLocaleString(), size: "small", style: { minWidth: 100 }, slots: {
|
|
44
|
-
valueLabel: SliderTooltip_1.default,
|
|
45
|
-
} })] }));
|
|
46
|
-
});
|
|
47
|
-
exports.default = MinLengthSlider;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
-
const material_1 = require("@mui/material");
|
|
8
|
-
const mobx_react_1 = require("mobx-react");
|
|
9
|
-
const mui_1 = require("tss-react/mui");
|
|
10
|
-
const SliderTooltip_1 = __importDefault(require("./SliderTooltip"));
|
|
11
|
-
const useStyles = (0, mui_1.makeStyles)()({
|
|
12
|
-
container: {
|
|
13
|
-
display: 'flex',
|
|
14
|
-
alignItems: 'center',
|
|
15
|
-
marginLeft: 16,
|
|
16
|
-
marginRight: 16,
|
|
17
|
-
minWidth: 150,
|
|
18
|
-
},
|
|
19
|
-
});
|
|
20
|
-
const OpacitySlider = (0, mobx_react_1.observer)(function ({ model, }) {
|
|
21
|
-
var _a, _b, _c;
|
|
22
|
-
const { classes } = useStyles();
|
|
23
|
-
const { levels } = model;
|
|
24
|
-
const firstDisplay = (_b = (_a = levels[0]) === null || _a === void 0 ? void 0 : _a.tracks[0]) === null || _b === void 0 ? void 0 : _b.displays[0];
|
|
25
|
-
const alpha = (_c = firstDisplay === null || firstDisplay === void 0 ? void 0 : firstDisplay.alpha) !== null && _c !== void 0 ? _c : 1;
|
|
26
|
-
const exponent = 3;
|
|
27
|
-
const alphaToSlider = (a) => Math.pow(a, 1 / exponent);
|
|
28
|
-
const sliderToAlpha = (s) => Math.pow(s, exponent);
|
|
29
|
-
const sliderValue = alphaToSlider(alpha);
|
|
30
|
-
const handleAlphaChange = (_event, value) => {
|
|
31
|
-
const sliderVal = typeof value === 'number' ? value : value[0];
|
|
32
|
-
const newAlpha = sliderToAlpha(sliderVal);
|
|
33
|
-
for (const level of levels) {
|
|
34
|
-
for (const track of level.tracks) {
|
|
35
|
-
for (const display of track.displays) {
|
|
36
|
-
;
|
|
37
|
-
display.setAlpha(newAlpha);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
return ((0, jsx_runtime_1.jsxs)(material_1.Box, { className: classes.container, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", style: { marginRight: 8 }, children: "Opacity:" }), (0, jsx_runtime_1.jsx)(material_1.Slider, { value: sliderValue, onChange: handleAlphaChange, min: 0, max: 1, step: 0.01, valueLabelDisplay: "auto", size: "small", style: { minWidth: 100 }, slots: {
|
|
43
|
-
valueLabel: SliderTooltip_1.default,
|
|
44
|
-
}, valueLabelFormat: (value) => sliderToAlpha(value).toFixed(3) })] }));
|
|
45
|
-
});
|
|
46
|
-
exports.default = OpacitySlider;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { LinearComparativeViewModel } from '../model';
|
|
2
|
-
type LCV = LinearComparativeViewModel;
|
|
3
|
-
declare const Rubberband: ({ model, ControlComponent, }: {
|
|
4
|
-
model: LCV;
|
|
5
|
-
ControlComponent?: React.ReactElement;
|
|
6
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
export default Rubberband;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
-
const react_1 = require("react");
|
|
8
|
-
const ui_1 = require("@jbrowse/core/ui");
|
|
9
|
-
const mobx_react_1 = require("mobx-react");
|
|
10
|
-
const mui_1 = require("tss-react/mui");
|
|
11
|
-
const RubberbandSpan_1 = __importDefault(require("./RubberbandSpan"));
|
|
12
|
-
const VerticalGuide_1 = __importDefault(require("./VerticalGuide"));
|
|
13
|
-
const useRangeSelect_1 = require("./useRangeSelect");
|
|
14
|
-
const useStyles = (0, mui_1.makeStyles)()({
|
|
15
|
-
rubberbandControl: {
|
|
16
|
-
cursor: 'crosshair',
|
|
17
|
-
width: '100%',
|
|
18
|
-
minHeight: 8,
|
|
19
|
-
position: 'relative',
|
|
20
|
-
zIndex: 900,
|
|
21
|
-
},
|
|
22
|
-
});
|
|
23
|
-
const Rubberband = (0, mobx_react_1.observer)(function ({ model, ControlComponent = (0, jsx_runtime_1.jsx)("div", {}), }) {
|
|
24
|
-
const ref = (0, react_1.useRef)(null);
|
|
25
|
-
const { classes } = useStyles();
|
|
26
|
-
const { guideX, rubberbandOn, leftBpOffset, rightBpOffset, numOfBpSelected, width, left, anchorPosition, open, handleMenuItemClick, handleClose, mouseMove, mouseDown, mouseOut, } = (0, useRangeSelect_1.useRangeSelect)(ref, model);
|
|
27
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [guideX !== undefined ? ((0, jsx_runtime_1.jsx)(VerticalGuide_1.default, { model: model, coordX: guideX })) : rubberbandOn ? ((0, jsx_runtime_1.jsx)(RubberbandSpan_1.default, { leftBpOffset: leftBpOffset, rightBpOffset: rightBpOffset, numOfBpSelected: numOfBpSelected, width: width, left: left })) : null, anchorPosition ? ((0, jsx_runtime_1.jsx)(ui_1.Menu, { anchorReference: "anchorPosition", anchorPosition: {
|
|
28
|
-
left: anchorPosition.clientX,
|
|
29
|
-
top: anchorPosition.clientY,
|
|
30
|
-
}, onMenuItemClick: handleMenuItemClick, open: open, onClose: handleClose, menuItems: model.rubberBandMenuItems() })) : null, (0, jsx_runtime_1.jsx)("div", { "data-testid": "rubberband_controls", className: classes.rubberbandControl, ref: ref, onMouseDown: mouseDown, onMouseMove: mouseMove, onMouseOut: mouseOut, children: ControlComponent })] }));
|
|
31
|
-
});
|
|
32
|
-
exports.default = Rubberband;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
interface Offset {
|
|
2
|
-
coord: number;
|
|
3
|
-
refName?: string;
|
|
4
|
-
oob?: boolean;
|
|
5
|
-
}
|
|
6
|
-
export default function RubberbandSpan({ leftBpOffset, rightBpOffset, numOfBpSelected, left, width, top, sticky, }: {
|
|
7
|
-
leftBpOffset: Offset[];
|
|
8
|
-
rightBpOffset: Offset[];
|
|
9
|
-
numOfBpSelected?: number[];
|
|
10
|
-
left: number;
|
|
11
|
-
width: number;
|
|
12
|
-
top?: number;
|
|
13
|
-
sticky?: boolean;
|
|
14
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
15
|
-
export {};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.default = RubberbandSpan;
|
|
7
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
-
const react_1 = require("react");
|
|
9
|
-
const util_1 = require("@jbrowse/core/util");
|
|
10
|
-
const material_1 = require("@mui/material");
|
|
11
|
-
const mui_1 = require("tss-react/mui");
|
|
12
|
-
const RubberbandTooltip_1 = __importDefault(require("./RubberbandTooltip"));
|
|
13
|
-
const useStyles = (0, mui_1.makeStyles)()(theme => {
|
|
14
|
-
const { tertiary } = theme.palette;
|
|
15
|
-
const background = (0, material_1.alpha)(tertiary.light, 0.7);
|
|
16
|
-
return {
|
|
17
|
-
rubberband: {
|
|
18
|
-
height: '100%',
|
|
19
|
-
background,
|
|
20
|
-
position: 'absolute',
|
|
21
|
-
zIndex: 830,
|
|
22
|
-
textAlign: 'center',
|
|
23
|
-
},
|
|
24
|
-
rubberbandText: {
|
|
25
|
-
color: theme.palette.tertiary.contrastText,
|
|
26
|
-
},
|
|
27
|
-
};
|
|
28
|
-
});
|
|
29
|
-
function RubberbandSpan({ leftBpOffset, rightBpOffset, numOfBpSelected, left, width, top = 0, sticky = false, }) {
|
|
30
|
-
const { classes } = useStyles();
|
|
31
|
-
const [anchorEl, setAnchorEl] = (0, react_1.useState)(null);
|
|
32
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [anchorEl ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(RubberbandTooltip_1.default, { side: "left", anchorEl: anchorEl, text: leftBpOffset.map((l, idx) => ((0, jsx_runtime_1.jsx)("div", { children: (0, util_1.stringify)(l, true) }, `${JSON.stringify(l)}-left-${idx}`))) }), (0, jsx_runtime_1.jsx)(RubberbandTooltip_1.default, { side: "right", anchorEl: anchorEl, text: rightBpOffset.map((l, idx) => ((0, jsx_runtime_1.jsx)("div", { children: (0, util_1.stringify)(l, true) }, `${JSON.stringify(l)}-right-${idx}`))) })] })) : null, (0, jsx_runtime_1.jsx)("div", { className: classes.rubberband, style: { left, width }, children: numOfBpSelected ? ((0, jsx_runtime_1.jsx)(material_1.Typography, { ref: el => {
|
|
33
|
-
setAnchorEl(el);
|
|
34
|
-
}, variant: "h6", className: classes.rubberbandText, style: {
|
|
35
|
-
top,
|
|
36
|
-
position: sticky ? 'sticky' : undefined,
|
|
37
|
-
}, children: numOfBpSelected.map((n, i) => ((0, jsx_runtime_1.jsx)("div", { children: (0, util_1.getBpDisplayStr)(n) }, `bpSelectedRow-${i}`))) })) : null })] }));
|
|
38
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.default = RubberbandTooltip;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const material_1 = require("@mui/material");
|
|
6
|
-
function RubberbandTooltip({ anchorEl, side, text, }) {
|
|
7
|
-
return ((0, jsx_runtime_1.jsx)(material_1.Tooltip, { title: text, open: true, placement: side === 'left' ? 'left-start' : 'right-start', slotProps: {
|
|
8
|
-
popper: {
|
|
9
|
-
anchorEl,
|
|
10
|
-
modifiers: [
|
|
11
|
-
{
|
|
12
|
-
name: 'offset',
|
|
13
|
-
options: {
|
|
14
|
-
offset: [-30, -10],
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
],
|
|
18
|
-
},
|
|
19
|
-
}, children: (0, jsx_runtime_1.jsx)("span", {}) }));
|
|
20
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.default = SliderTooltip;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const material_1 = require("@mui/material");
|
|
6
|
-
function SliderTooltip(props) {
|
|
7
|
-
const { children, open, value } = props;
|
|
8
|
-
return ((0, jsx_runtime_1.jsx)(material_1.Tooltip, { open: open, enterTouchDelay: 0, placement: "top", title: value, arrow: true, children: children }));
|
|
9
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
|
-
const util_1 = require("@jbrowse/core/util");
|
|
5
|
-
const material_1 = require("@mui/material");
|
|
6
|
-
const mobx_react_1 = require("mobx-react");
|
|
7
|
-
const mui_1 = require("tss-react/mui");
|
|
8
|
-
const useStyles = (0, mui_1.makeStyles)()({
|
|
9
|
-
guide: {
|
|
10
|
-
pointerEvents: 'none',
|
|
11
|
-
height: '100%',
|
|
12
|
-
width: 1,
|
|
13
|
-
position: 'absolute',
|
|
14
|
-
background: 'red',
|
|
15
|
-
zIndex: 1001,
|
|
16
|
-
},
|
|
17
|
-
});
|
|
18
|
-
const VerticalGuide = (0, mobx_react_1.observer)(function ({ model, coordX, }) {
|
|
19
|
-
const { classes } = useStyles();
|
|
20
|
-
return ((0, jsx_runtime_1.jsx)(material_1.Tooltip, { open: true, placement: "top", title: model.views
|
|
21
|
-
.map(view => view.pxToBp(coordX))
|
|
22
|
-
.map((elt, idx) => ((0, jsx_runtime_1.jsx)("div", { children: (0, util_1.stringify)(elt, true) }, [JSON.stringify(elt), idx].join('-')))), arrow: true, children: (0, jsx_runtime_1.jsx)("div", { className: classes.guide, style: {
|
|
23
|
-
left: coordX,
|
|
24
|
-
} }) }));
|
|
25
|
-
});
|
|
26
|
-
exports.default = VerticalGuide;
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import type React from 'react';
|
|
2
|
-
import type { LinearComparativeViewModel } from '../model';
|
|
3
|
-
interface AnchorPosition {
|
|
4
|
-
offsetX: number;
|
|
5
|
-
clientX: number;
|
|
6
|
-
clientY: number;
|
|
7
|
-
}
|
|
8
|
-
export declare function useRangeSelect(ref: React.RefObject<HTMLDivElement | null>, model: LinearComparativeViewModel): {
|
|
9
|
-
open: boolean;
|
|
10
|
-
guideX: number | undefined;
|
|
11
|
-
mouseDown: (event: React.MouseEvent<HTMLDivElement>) => void;
|
|
12
|
-
mouseMove: (event: React.MouseEvent<HTMLDivElement>) => void;
|
|
13
|
-
mouseOut: () => void;
|
|
14
|
-
handleMenuItemClick: (_: unknown, callback: () => void) => void;
|
|
15
|
-
rubberbandOn?: undefined;
|
|
16
|
-
handleClose?: undefined;
|
|
17
|
-
leftBpOffset?: undefined;
|
|
18
|
-
rightBpOffset?: undefined;
|
|
19
|
-
anchorPosition?: undefined;
|
|
20
|
-
numOfBpSelected?: undefined;
|
|
21
|
-
width?: undefined;
|
|
22
|
-
left?: undefined;
|
|
23
|
-
} | {
|
|
24
|
-
open: boolean;
|
|
25
|
-
rubberbandOn: boolean;
|
|
26
|
-
mouseDown: (event: React.MouseEvent<HTMLDivElement>) => void;
|
|
27
|
-
mouseMove: (event: React.MouseEvent<HTMLDivElement>) => void;
|
|
28
|
-
mouseOut: () => void;
|
|
29
|
-
handleClose: () => void;
|
|
30
|
-
handleMenuItemClick: (_: unknown, callback: () => void) => void;
|
|
31
|
-
leftBpOffset: {
|
|
32
|
-
coord: number;
|
|
33
|
-
index: number;
|
|
34
|
-
refName: string;
|
|
35
|
-
oob: boolean;
|
|
36
|
-
assemblyName: string;
|
|
37
|
-
offset: number;
|
|
38
|
-
start: number;
|
|
39
|
-
end: number;
|
|
40
|
-
reversed?: boolean;
|
|
41
|
-
}[];
|
|
42
|
-
rightBpOffset: {
|
|
43
|
-
coord: number;
|
|
44
|
-
index: number;
|
|
45
|
-
refName: string;
|
|
46
|
-
oob: boolean;
|
|
47
|
-
assemblyName: string;
|
|
48
|
-
offset: number;
|
|
49
|
-
start: number;
|
|
50
|
-
end: number;
|
|
51
|
-
reversed?: boolean;
|
|
52
|
-
}[];
|
|
53
|
-
anchorPosition: AnchorPosition | undefined;
|
|
54
|
-
numOfBpSelected: number[];
|
|
55
|
-
width: number;
|
|
56
|
-
left: number;
|
|
57
|
-
guideX?: undefined;
|
|
58
|
-
};
|
|
59
|
-
export {};
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useRangeSelect = useRangeSelect;
|
|
4
|
-
const react_1 = require("react");
|
|
5
|
-
const mobx_1 = require("mobx");
|
|
6
|
-
const util_1 = require("./util");
|
|
7
|
-
function useRangeSelect(ref, model) {
|
|
8
|
-
const [startX, setStartX] = (0, react_1.useState)();
|
|
9
|
-
const [currentX, setCurrentX] = (0, react_1.useState)();
|
|
10
|
-
const [anchorPosition, setAnchorPosition] = (0, react_1.useState)();
|
|
11
|
-
const [guideX, setGuideX] = (0, react_1.useState)();
|
|
12
|
-
const mouseDragging = startX !== undefined && anchorPosition === undefined;
|
|
13
|
-
const handleClose = (0, react_1.useCallback)(() => {
|
|
14
|
-
setAnchorPosition(undefined);
|
|
15
|
-
setStartX(undefined);
|
|
16
|
-
setCurrentX(undefined);
|
|
17
|
-
}, []);
|
|
18
|
-
(0, react_1.useEffect)(() => {
|
|
19
|
-
function computeOffsets(offsetX) {
|
|
20
|
-
if (startX === undefined) {
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
23
|
-
const leftPx = Math.min(startX, offsetX);
|
|
24
|
-
const rightPx = Math.max(startX, offsetX);
|
|
25
|
-
return model.views.map(view => ({
|
|
26
|
-
leftOffset: view.pxToBp(leftPx),
|
|
27
|
-
rightOffset: view.pxToBp(rightPx),
|
|
28
|
-
}));
|
|
29
|
-
}
|
|
30
|
-
function globalMouseMove(event) {
|
|
31
|
-
if (ref.current && mouseDragging) {
|
|
32
|
-
const relativeX = (0, util_1.getRelativeX)(event, ref.current);
|
|
33
|
-
setCurrentX(relativeX);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
function globalMouseUp(event) {
|
|
37
|
-
if (startX !== undefined && ref.current) {
|
|
38
|
-
const { clientX, clientY } = event;
|
|
39
|
-
const offsetX = (0, util_1.getRelativeX)(event, ref.current);
|
|
40
|
-
if (Math.abs(offsetX - startX) <= 3) {
|
|
41
|
-
handleClose();
|
|
42
|
-
return;
|
|
43
|
-
}
|
|
44
|
-
setAnchorPosition({
|
|
45
|
-
offsetX,
|
|
46
|
-
clientX,
|
|
47
|
-
clientY,
|
|
48
|
-
});
|
|
49
|
-
const offsets = computeOffsets(offsetX);
|
|
50
|
-
if (offsets) {
|
|
51
|
-
(0, mobx_1.transaction)(() => {
|
|
52
|
-
for (const [idx, elt] of offsets.entries()) {
|
|
53
|
-
model.views[idx].setOffsets(elt.leftOffset, elt.rightOffset);
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
setGuideX(undefined);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
if (mouseDragging) {
|
|
61
|
-
window.addEventListener('mousemove', globalMouseMove);
|
|
62
|
-
window.addEventListener('mouseup', globalMouseUp);
|
|
63
|
-
return () => {
|
|
64
|
-
window.removeEventListener('mousemove', globalMouseMove);
|
|
65
|
-
window.removeEventListener('mouseup', globalMouseUp);
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
return () => { };
|
|
69
|
-
}, [startX, mouseDragging, model, ref, handleClose]);
|
|
70
|
-
function mouseDown(event) {
|
|
71
|
-
event.preventDefault();
|
|
72
|
-
event.stopPropagation();
|
|
73
|
-
const relativeX = (0, util_1.getRelativeX)(event, ref.current);
|
|
74
|
-
setStartX(relativeX);
|
|
75
|
-
setCurrentX(relativeX);
|
|
76
|
-
}
|
|
77
|
-
function mouseMove(event) {
|
|
78
|
-
setGuideX((0, util_1.getRelativeX)(event, ref.current));
|
|
79
|
-
}
|
|
80
|
-
function mouseOut() {
|
|
81
|
-
setGuideX(undefined);
|
|
82
|
-
(0, mobx_1.transaction)(() => {
|
|
83
|
-
for (const view of model.views) {
|
|
84
|
-
view.setOffsets(undefined, undefined);
|
|
85
|
-
}
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
function handleMenuItemClick(_, callback) {
|
|
89
|
-
callback();
|
|
90
|
-
handleClose();
|
|
91
|
-
}
|
|
92
|
-
const open = Boolean(anchorPosition);
|
|
93
|
-
if (startX === undefined) {
|
|
94
|
-
return {
|
|
95
|
-
open,
|
|
96
|
-
guideX,
|
|
97
|
-
mouseDown,
|
|
98
|
-
mouseMove,
|
|
99
|
-
mouseOut,
|
|
100
|
-
handleMenuItemClick,
|
|
101
|
-
};
|
|
102
|
-
}
|
|
103
|
-
const right = anchorPosition ? anchorPosition.offsetX : currentX || 0;
|
|
104
|
-
const left = Math.min(right, startX);
|
|
105
|
-
const width = Math.abs(right - startX);
|
|
106
|
-
const leftBpOffset = model.views.map(view => view.pxToBp(left));
|
|
107
|
-
const rightBpOffset = model.views.map(view => view.pxToBp(left + width));
|
|
108
|
-
const numOfBpSelected = model.views.map(view => Math.ceil(width * view.bpPerPx));
|
|
109
|
-
return {
|
|
110
|
-
open,
|
|
111
|
-
rubberbandOn: true,
|
|
112
|
-
mouseDown,
|
|
113
|
-
mouseMove,
|
|
114
|
-
mouseOut,
|
|
115
|
-
handleClose,
|
|
116
|
-
handleMenuItemClick,
|
|
117
|
-
leftBpOffset,
|
|
118
|
-
rightBpOffset,
|
|
119
|
-
anchorPosition,
|
|
120
|
-
numOfBpSelected,
|
|
121
|
-
width,
|
|
122
|
-
left,
|
|
123
|
-
};
|
|
124
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getRelativeX = getRelativeX;
|
|
4
|
-
function getRelativeX(event, element) {
|
|
5
|
-
return event.clientX - ((element === null || element === void 0 ? void 0 : element.getBoundingClientRect().left) || 0);
|
|
6
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
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;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
-
};
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.default = LinearComparativeViewF;
|
|
40
|
-
const react_1 = require("react");
|
|
41
|
-
const ViewType_1 = __importDefault(require("@jbrowse/core/pluggableElementTypes/ViewType"));
|
|
42
|
-
const model_1 = __importDefault(require("./model"));
|
|
43
|
-
function LinearComparativeViewF(pluginManager) {
|
|
44
|
-
pluginManager.addViewType(() => {
|
|
45
|
-
return new ViewType_1.default({
|
|
46
|
-
name: 'LinearComparativeView',
|
|
47
|
-
viewMetadata: {
|
|
48
|
-
hiddenFromGUI: true,
|
|
49
|
-
},
|
|
50
|
-
displayName: 'Linear comparative view',
|
|
51
|
-
stateModel: (0, model_1.default)(pluginManager),
|
|
52
|
-
ReactComponent: (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('./components/LinearComparativeView')))),
|
|
53
|
-
});
|
|
54
|
-
});
|
|
55
|
-
}
|