@jbrowse/plugin-dotplot-view 2.17.0 → 3.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/ComparativeRenderer/index.d.ts +3 -8
- package/dist/ComparativeRenderer/index.js +3 -8
- package/dist/DotplotDisplay/components/DotplotDisplay.d.ts +2 -3
- package/dist/DotplotDisplay/components/DotplotDisplay.js +7 -12
- package/dist/DotplotDisplay/index.d.ts +1 -7
- package/dist/DotplotDisplay/index.js +2 -12
- package/dist/DotplotDisplay/renderDotplotBlock.d.ts +1 -1
- package/dist/DotplotDisplay/renderDotplotBlock.js +3 -9
- package/dist/DotplotDisplay/stateModelFactory.d.ts +8 -45
- package/dist/DotplotDisplay/stateModelFactory.js +57 -100
- package/dist/DotplotReadVsRef/DotplotReadVsRef.d.ts +2 -2
- package/dist/DotplotReadVsRef/DotplotReadVsRef.js +13 -14
- package/dist/DotplotReadVsRef/index.d.ts +1 -1
- package/dist/DotplotReadVsRef/index.js +0 -2
- package/dist/DotplotRenderer/ComparativeRenderRpc.d.ts +3 -8
- package/dist/DotplotRenderer/ComparativeRenderRpc.js +3 -8
- package/dist/DotplotRenderer/DotplotRenderer.d.ts +8 -7
- package/dist/DotplotRenderer/DotplotRenderer.js +18 -9
- package/dist/DotplotRenderer/components/DotplotRendering.d.ts +2 -3
- package/dist/DotplotRenderer/components/DotplotRendering.js +2 -5
- package/dist/DotplotRenderer/configSchema.d.ts +0 -21
- package/dist/DotplotRenderer/configSchema.js +2 -27
- package/dist/DotplotRenderer/drawDotplot.d.ts +3 -3
- package/dist/DotplotRenderer/drawDotplot.js +3 -6
- package/dist/DotplotRenderer/index.d.ts +1 -1
- package/dist/DotplotRenderer/index.js +1 -1
- package/dist/DotplotView/1dview.d.ts +2 -77
- package/dist/DotplotView/1dview.js +4 -33
- package/dist/DotplotView/components/Axes.d.ts +5 -6
- package/dist/DotplotView/components/Axes.js +26 -40
- package/dist/DotplotView/components/CursorIcon.d.ts +3 -4
- package/dist/DotplotView/components/CursorIcon.js +3 -5
- package/dist/DotplotView/components/DotplotControls.d.ts +2 -3
- package/dist/DotplotView/components/DotplotControls.js +94 -97
- package/dist/DotplotView/components/DotplotTooltipClick.d.ts +2 -3
- package/dist/DotplotView/components/DotplotTooltipClick.js +3 -7
- package/dist/DotplotView/components/DotplotTooltipMouseover.d.ts +2 -3
- package/dist/DotplotView/components/DotplotTooltipMouseover.js +4 -8
- package/dist/DotplotView/components/DotplotView.d.ts +2 -3
- package/dist/DotplotView/components/DotplotView.js +80 -92
- package/dist/DotplotView/components/DotplotWarnings.d.ts +2 -3
- package/dist/DotplotView/components/DotplotWarnings.js +26 -21
- package/dist/DotplotView/components/ExportSvgDialog.d.ts +2 -3
- package/dist/DotplotView/components/ExportSvgDialog.js +32 -67
- package/dist/DotplotView/components/Grid.d.ts +3 -4
- package/dist/DotplotView/components/Grid.js +19 -32
- package/dist/DotplotView/components/Header.d.ts +2 -3
- package/dist/DotplotView/components/Header.js +4 -23
- package/dist/DotplotView/components/ImportForm/ImportSyntenyOpenCustomTrack.d.ts +7 -0
- package/dist/DotplotView/components/ImportForm/ImportSyntenyOpenCustomTrack.js +129 -0
- package/dist/DotplotView/components/ImportForm/ImportSyntenyTrackSelector.d.ts +4 -6
- package/dist/DotplotView/components/ImportForm/ImportSyntenyTrackSelector.js +17 -48
- package/dist/DotplotView/components/ImportForm/TrackSelector.d.ts +7 -0
- package/dist/DotplotView/components/ImportForm/TrackSelector.js +23 -0
- package/dist/DotplotView/components/ImportForm/getAdapter.d.ts +117 -0
- package/dist/DotplotView/components/ImportForm/getAdapter.js +68 -0
- package/dist/DotplotView/components/ImportForm/index.d.ts +3 -4
- package/dist/DotplotView/components/ImportForm/index.js +47 -97
- package/dist/DotplotView/components/ImportForm/util.js +1 -3
- package/dist/DotplotView/components/PanButtons.d.ts +2 -3
- package/dist/DotplotView/components/PanButtons.js +17 -36
- package/dist/DotplotView/components/WarningDialog.d.ts +7 -7
- package/dist/DotplotView/components/WarningDialog.js +12 -15
- package/dist/DotplotView/components/util.d.ts +2 -7
- package/dist/DotplotView/components/util.js +0 -5
- package/dist/DotplotView/index.d.ts +1 -1
- package/dist/DotplotView/index.js +17 -8
- package/dist/DotplotView/model.d.ts +11 -133
- package/dist/DotplotView/model.js +46 -222
- package/dist/DotplotView/svgcomponents/SVGBackground.d.ts +1 -2
- package/dist/DotplotView/svgcomponents/SVGBackground.js +3 -6
- package/dist/DotplotView/svgcomponents/SVGDotplotView.d.ts +1 -1
- package/dist/DotplotView/svgcomponents/SVGDotplotView.js +6 -24
- package/dist/DotplotView/types.d.ts +12 -0
- package/dist/DotplotView/types.js +2 -0
- package/dist/LaunchDotplotView.d.ts +1 -1
- package/dist/LaunchDotplotView.js +1 -4
- package/dist/ServerSideRenderedBlockContent.d.ts +2 -2
- package/dist/ServerSideRenderedBlockContent.js +11 -37
- package/dist/ServerSideSyntenyRendering.d.ts +1 -6
- package/dist/ServerSideSyntenyRendering.js +4 -26
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -6
- package/dist/util.d.ts +1 -1
- package/esm/ComparativeRenderer/index.d.ts +3 -8
- package/esm/ComparativeRenderer/index.js +3 -8
- package/esm/DotplotDisplay/components/DotplotDisplay.d.ts +2 -3
- package/esm/DotplotDisplay/components/DotplotDisplay.js +7 -9
- package/esm/DotplotDisplay/index.d.ts +1 -7
- package/esm/DotplotDisplay/index.js +2 -12
- package/esm/DotplotDisplay/renderDotplotBlock.d.ts +1 -1
- package/esm/DotplotDisplay/renderDotplotBlock.js +3 -6
- package/esm/DotplotDisplay/stateModelFactory.d.ts +8 -45
- package/esm/DotplotDisplay/stateModelFactory.js +58 -101
- package/esm/DotplotReadVsRef/DotplotReadVsRef.d.ts +2 -2
- package/esm/DotplotReadVsRef/DotplotReadVsRef.js +15 -16
- package/esm/DotplotReadVsRef/index.d.ts +1 -1
- package/esm/DotplotReadVsRef/index.js +0 -2
- package/esm/DotplotRenderer/ComparativeRenderRpc.d.ts +3 -8
- package/esm/DotplotRenderer/ComparativeRenderRpc.js +3 -8
- package/esm/DotplotRenderer/DotplotRenderer.d.ts +8 -7
- package/esm/DotplotRenderer/DotplotRenderer.js +1 -2
- package/esm/DotplotRenderer/components/DotplotRendering.d.ts +2 -3
- package/esm/DotplotRenderer/components/DotplotRendering.js +2 -2
- package/esm/DotplotRenderer/configSchema.d.ts +0 -21
- package/esm/DotplotRenderer/configSchema.js +2 -27
- package/esm/DotplotRenderer/drawDotplot.d.ts +3 -3
- package/esm/DotplotRenderer/drawDotplot.js +4 -7
- package/esm/DotplotRenderer/index.d.ts +1 -1
- package/esm/DotplotRenderer/index.js +1 -1
- package/esm/DotplotView/1dview.d.ts +2 -77
- package/esm/DotplotView/1dview.js +4 -33
- package/esm/DotplotView/components/Axes.d.ts +5 -6
- package/esm/DotplotView/components/Axes.js +26 -37
- package/esm/DotplotView/components/CursorIcon.d.ts +3 -4
- package/esm/DotplotView/components/CursorIcon.js +3 -5
- package/esm/DotplotView/components/DotplotControls.d.ts +2 -3
- package/esm/DotplotView/components/DotplotControls.js +94 -97
- package/esm/DotplotView/components/DotplotTooltipClick.d.ts +2 -3
- package/esm/DotplotView/components/DotplotTooltipClick.js +3 -7
- package/esm/DotplotView/components/DotplotTooltipMouseover.d.ts +2 -3
- package/esm/DotplotView/components/DotplotTooltipMouseover.js +4 -8
- package/esm/DotplotView/components/DotplotView.d.ts +2 -3
- package/esm/DotplotView/components/DotplotView.js +63 -85
- package/esm/DotplotView/components/DotplotWarnings.d.ts +2 -3
- package/esm/DotplotView/components/DotplotWarnings.js +9 -14
- package/esm/DotplotView/components/ExportSvgDialog.d.ts +2 -3
- package/esm/DotplotView/components/ExportSvgDialog.js +32 -44
- package/esm/DotplotView/components/Grid.d.ts +3 -4
- package/esm/DotplotView/components/Grid.js +19 -29
- package/esm/DotplotView/components/Header.d.ts +2 -3
- package/esm/DotplotView/components/Header.js +4 -23
- package/esm/DotplotView/components/ImportForm/ImportSyntenyOpenCustomTrack.d.ts +7 -0
- package/esm/DotplotView/components/ImportForm/ImportSyntenyOpenCustomTrack.js +124 -0
- package/esm/DotplotView/components/ImportForm/ImportSyntenyTrackSelector.d.ts +4 -6
- package/esm/DotplotView/components/ImportForm/ImportSyntenyTrackSelector.js +17 -25
- package/esm/DotplotView/components/ImportForm/TrackSelector.d.ts +7 -0
- package/esm/DotplotView/components/ImportForm/TrackSelector.js +18 -0
- package/esm/DotplotView/components/ImportForm/getAdapter.d.ts +117 -0
- package/esm/DotplotView/components/ImportForm/getAdapter.js +65 -0
- package/esm/DotplotView/components/ImportForm/index.d.ts +3 -4
- package/esm/DotplotView/components/ImportForm/index.js +48 -75
- package/esm/DotplotView/components/ImportForm/util.js +1 -3
- package/esm/DotplotView/components/PanButtons.d.ts +2 -3
- package/esm/DotplotView/components/PanButtons.js +17 -36
- package/esm/DotplotView/components/WarningDialog.d.ts +7 -7
- package/esm/DotplotView/components/WarningDialog.js +12 -12
- package/esm/DotplotView/components/util.d.ts +2 -7
- package/esm/DotplotView/components/util.js +0 -5
- package/esm/DotplotView/index.d.ts +1 -1
- package/esm/DotplotView/index.js +0 -1
- package/esm/DotplotView/model.d.ts +11 -133
- package/esm/DotplotView/model.js +30 -216
- package/esm/DotplotView/svgcomponents/SVGBackground.d.ts +1 -2
- package/esm/DotplotView/svgcomponents/SVGBackground.js +3 -3
- package/esm/DotplotView/svgcomponents/SVGDotplotView.d.ts +1 -1
- package/esm/DotplotView/svgcomponents/SVGDotplotView.js +6 -24
- package/esm/DotplotView/types.d.ts +12 -0
- package/esm/DotplotView/types.js +1 -0
- package/esm/LaunchDotplotView.d.ts +1 -1
- package/esm/LaunchDotplotView.js +1 -4
- package/esm/ServerSideRenderedBlockContent.d.ts +2 -2
- package/esm/ServerSideRenderedBlockContent.js +11 -14
- package/esm/ServerSideSyntenyRendering.d.ts +1 -6
- package/esm/ServerSideSyntenyRendering.js +4 -3
- package/esm/index.d.ts +1 -1
- package/esm/index.js +3 -6
- package/esm/util.d.ts +1 -1
- package/package.json +2 -4
- package/dist/DotplotView/components/ImportForm/ImportCustomTrack.d.ts +0 -11
- package/dist/DotplotView/components/ImportForm/ImportCustomTrack.js +0 -194
- package/esm/DotplotView/components/ImportForm/ImportCustomTrack.d.ts +0 -11
- package/esm/DotplotView/components/ImportForm/ImportCustomTrack.js +0 -169
|
@@ -5,13 +5,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.CursorMove = CursorMove;
|
|
7
7
|
exports.CursorMouse = CursorMouse;
|
|
8
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
9
|
const SvgIcon_1 = __importDefault(require("@mui/material/SvgIcon"));
|
|
9
|
-
const react_1 = __importDefault(require("react"));
|
|
10
10
|
function CursorMove(props) {
|
|
11
|
-
return (
|
|
12
|
-
react_1.default.createElement("path", { fill: "currentColor", d: "M13,6V11H18V7.75L22.25,12L18,16.25V13H13V18H16.25L12,22.25L7.75,18H11V13H6V16.25L1.75,12L6,7.75V11H11V6H7.75L12,1.75L16.25,6H13Z" })));
|
|
11
|
+
return ((0, jsx_runtime_1.jsx)(SvgIcon_1.default, { ...props, children: (0, jsx_runtime_1.jsx)("path", { fill: "currentColor", d: "M13,6V11H18V7.75L22.25,12L18,16.25V13H13V18H16.25L12,22.25L7.75,18H11V13H6V16.25L1.75,12L6,7.75V11H11V6H7.75L12,1.75L16.25,6H13Z" }) }));
|
|
13
12
|
}
|
|
14
13
|
function CursorMouse(props) {
|
|
15
|
-
return (
|
|
16
|
-
react_1.default.createElement("path", { fill: "currentColor", d: "M10.07,14.27C10.57,14.03 11.16,14.25 11.4,14.75L13.7,19.74L15.5,18.89L13.19,13.91C12.95,13.41 13.17,12.81 13.67,12.58L13.95,12.5L16.25,12.05L8,5.12V15.9L9.82,14.43L10.07,14.27M13.64,21.97C13.14,22.21 12.54,22 12.31,21.5L10.13,16.76L7.62,18.78C7.45,18.92 7.24,19 7,19A1,1 0 0,1 6,18V3A1,1 0 0,1 7,2C7.24,2 7.47,2.09 7.64,2.23L7.65,2.22L19.14,11.86C19.57,12.22 19.62,12.85 19.27,13.27C19.12,13.45 18.91,13.57 18.7,13.61L15.54,14.23L17.74,18.96C18,19.46 17.76,20.05 17.26,20.28L13.64,21.97Z" })));
|
|
14
|
+
return ((0, jsx_runtime_1.jsx)(SvgIcon_1.default, { ...props, children: (0, jsx_runtime_1.jsx)("path", { fill: "currentColor", d: "M10.07,14.27C10.57,14.03 11.16,14.25 11.4,14.75L13.7,19.74L15.5,18.89L13.19,13.91C12.95,13.41 13.17,12.81 13.67,12.58L13.95,12.5L16.25,12.05L8,5.12V15.9L9.82,14.43L10.07,14.27M13.64,21.97C13.14,22.21 12.54,22 12.31,21.5L10.13,16.76L7.62,18.78C7.45,18.92 7.24,19 7,19A1,1 0 0,1 6,18V3A1,1 0 0,1 7,2C7.24,2 7.47,2.09 7.64,2.23L7.65,2.22L19.14,11.86C19.57,12.22 19.62,12.85 19.27,13.27C19.12,13.45 18.91,13.57 18.7,13.61L15.54,14.23L17.74,18.96C18,19.46 17.76,20.05 17.26,20.28L13.64,21.97Z" }) }));
|
|
17
15
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { DotplotViewModel } from '../model';
|
|
1
|
+
import type { DotplotViewModel } from '../model';
|
|
3
2
|
declare const DotplotControls: ({ model, }: {
|
|
4
3
|
model: DotplotViewModel;
|
|
5
|
-
}) =>
|
|
4
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
6
5
|
export default DotplotControls;
|
|
@@ -3,116 +3,113 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const
|
|
7
|
-
const material_1 = require("@mui/material");
|
|
8
|
-
const mobx_react_1 = require("mobx-react");
|
|
6
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
9
7
|
const CascadingMenuButton_1 = __importDefault(require("@jbrowse/core/ui/CascadingMenuButton"));
|
|
10
|
-
|
|
11
|
-
const
|
|
12
|
-
const
|
|
8
|
+
const Icons_1 = require("@jbrowse/core/ui/Icons");
|
|
9
|
+
const CropDin_1 = __importDefault(require("@mui/icons-material/CropDin"));
|
|
10
|
+
const CropLandscape_1 = __importDefault(require("@mui/icons-material/CropLandscape"));
|
|
13
11
|
const MoreVert_1 = __importDefault(require("@mui/icons-material/MoreVert"));
|
|
12
|
+
const SettingsOverscan_1 = __importDefault(require("@mui/icons-material/SettingsOverscan"));
|
|
13
|
+
const ZoomIn_1 = __importDefault(require("@mui/icons-material/ZoomIn"));
|
|
14
|
+
const ZoomOut_1 = __importDefault(require("@mui/icons-material/ZoomOut"));
|
|
15
|
+
const material_1 = require("@mui/material");
|
|
16
|
+
const mobx_react_1 = require("mobx-react");
|
|
14
17
|
const CursorIcon_1 = require("./CursorIcon");
|
|
15
|
-
const Icons_1 = require("@jbrowse/core/ui/Icons");
|
|
16
18
|
const DotplotControls = (0, mobx_react_1.observer)(function ({ model, }) {
|
|
17
|
-
return (
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
react_1.default.createElement(CascadingMenuButton_1.default, { menuItems: [
|
|
29
|
-
{
|
|
30
|
-
onClick: () => {
|
|
31
|
-
model.squareView();
|
|
19
|
+
return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(material_1.IconButton, { onClick: () => {
|
|
20
|
+
model.zoomOut();
|
|
21
|
+
}, children: (0, jsx_runtime_1.jsx)(ZoomOut_1.default, {}) }), (0, jsx_runtime_1.jsx)(material_1.IconButton, { onClick: () => {
|
|
22
|
+
model.zoomIn();
|
|
23
|
+
}, children: (0, jsx_runtime_1.jsx)(ZoomIn_1.default, {}) }), (0, jsx_runtime_1.jsx)(material_1.IconButton, { onClick: () => model.activateTrackSelector(), title: "Open track selector", children: (0, jsx_runtime_1.jsx)(Icons_1.TrackSelector, {}) }), (0, jsx_runtime_1.jsx)(CascadingMenuButton_1.default, { menuItems: [
|
|
24
|
+
{
|
|
25
|
+
label: 'Square view - same bp per pixel',
|
|
26
|
+
icon: CropDin_1.default,
|
|
27
|
+
onClick: () => {
|
|
28
|
+
model.squareView();
|
|
29
|
+
},
|
|
32
30
|
},
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
31
|
+
{
|
|
32
|
+
label: 'Rectangular view - same total bp',
|
|
33
|
+
icon: CropLandscape_1.default,
|
|
34
|
+
onClick: () => {
|
|
35
|
+
model.squareViewProportional();
|
|
36
|
+
},
|
|
38
37
|
},
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
38
|
+
{
|
|
39
|
+
label: 'Show all regions',
|
|
40
|
+
icon: SettingsOverscan_1.default,
|
|
41
|
+
onClick: () => {
|
|
42
|
+
model.showAllRegions();
|
|
43
|
+
},
|
|
44
44
|
},
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
45
|
+
{
|
|
46
|
+
type: 'checkbox',
|
|
47
|
+
label: 'Draw CIGAR',
|
|
48
|
+
checked: model.drawCigar,
|
|
49
|
+
onClick: () => {
|
|
50
|
+
model.setDrawCigar(!model.drawCigar);
|
|
51
|
+
},
|
|
50
52
|
},
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
53
|
+
{
|
|
54
|
+
label: 'Show pan buttons',
|
|
55
|
+
type: 'checkbox',
|
|
56
|
+
checked: model.showPanButtons,
|
|
57
|
+
onClick: () => {
|
|
58
|
+
model.setShowPanButtons(!model.showPanButtons);
|
|
59
|
+
},
|
|
58
60
|
},
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
61
|
+
{
|
|
62
|
+
label: 'Click and drag mode',
|
|
63
|
+
subMenu: [
|
|
64
|
+
{
|
|
65
|
+
label: 'Pan by default, select region when ctrl/cmd key is held',
|
|
66
|
+
icon: CursorIcon_1.CursorMove,
|
|
67
|
+
type: 'radio',
|
|
68
|
+
checked: model.cursorMode === 'move',
|
|
69
|
+
onClick: () => {
|
|
70
|
+
model.setCursorMode('move');
|
|
71
|
+
},
|
|
69
72
|
},
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
73
|
+
{
|
|
74
|
+
label: 'Select region by default, pan when ctrl/cmd key is held',
|
|
75
|
+
icon: CursorIcon_1.CursorMouse,
|
|
76
|
+
type: 'radio',
|
|
77
|
+
checked: model.cursorMode === 'crosshair',
|
|
78
|
+
onClick: () => {
|
|
79
|
+
model.setCursorMode('crosshair');
|
|
80
|
+
},
|
|
78
81
|
},
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
model.setWheelMode('pan');
|
|
82
|
+
],
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
label: 'Wheel scroll mode',
|
|
86
|
+
subMenu: [
|
|
87
|
+
{
|
|
88
|
+
label: 'Pans view',
|
|
89
|
+
type: 'radio',
|
|
90
|
+
checked: model.wheelMode === 'pan',
|
|
91
|
+
onClick: () => {
|
|
92
|
+
model.setWheelMode('pan');
|
|
93
|
+
},
|
|
92
94
|
},
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
95
|
+
{
|
|
96
|
+
label: 'Zooms view',
|
|
97
|
+
type: 'radio',
|
|
98
|
+
checked: model.wheelMode === 'zoom',
|
|
99
|
+
onClick: () => {
|
|
100
|
+
model.setWheelMode('zoom');
|
|
101
|
+
},
|
|
100
102
|
},
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
103
|
+
{
|
|
104
|
+
label: 'Disable',
|
|
105
|
+
type: 'radio',
|
|
106
|
+
checked: model.wheelMode === 'none',
|
|
107
|
+
onClick: () => {
|
|
108
|
+
model.setWheelMode('none');
|
|
109
|
+
},
|
|
108
110
|
},
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
},
|
|
113
|
-
],
|
|
114
|
-
},
|
|
115
|
-
] },
|
|
116
|
-
react_1.default.createElement(MoreVert_1.default, null))));
|
|
111
|
+
],
|
|
112
|
+
},
|
|
113
|
+
], children: (0, jsx_runtime_1.jsx)(MoreVert_1.default, {}) })] }));
|
|
117
114
|
});
|
|
118
115
|
exports.default = DotplotControls;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { DotplotViewModel } from '../model';
|
|
1
|
+
import type { DotplotViewModel } from '../model';
|
|
3
2
|
type Coord = [number, number] | undefined;
|
|
4
3
|
export declare const DotplotTooltipClick: ({ model, mousedown, mousedownClient, xdistance, ydistance, }: {
|
|
5
4
|
model: DotplotViewModel;
|
|
@@ -7,5 +6,5 @@ export declare const DotplotTooltipClick: ({ model, mousedown, mousedownClient,
|
|
|
7
6
|
mousedownClient: Coord;
|
|
8
7
|
xdistance: number;
|
|
9
8
|
ydistance: number;
|
|
10
|
-
}) =>
|
|
9
|
+
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
11
10
|
export default DotplotTooltipClick;
|
|
@@ -4,18 +4,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.DotplotTooltipClick = void 0;
|
|
7
|
-
const
|
|
8
|
-
const mobx_react_1 = require("mobx-react");
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
9
8
|
const BaseTooltip_1 = __importDefault(require("@jbrowse/core/ui/BaseTooltip"));
|
|
9
|
+
const mobx_react_1 = require("mobx-react");
|
|
10
10
|
const util_1 = require("./util");
|
|
11
11
|
exports.DotplotTooltipClick = (0, mobx_react_1.observer)(function ({ model, mousedown, mousedownClient, xdistance, ydistance, }) {
|
|
12
12
|
const { hview, vview, viewHeight } = model;
|
|
13
13
|
const x = ((mousedownClient === null || mousedownClient === void 0 ? void 0 : mousedownClient[0]) || 0) - (xdistance < 0 ? 0 : 0);
|
|
14
14
|
const y = ((mousedownClient === null || mousedownClient === void 0 ? void 0 : mousedownClient[1]) || 0) - (ydistance < 0 ? 0 : 0);
|
|
15
|
-
return mousedown && Math.abs(xdistance) > 3 && Math.abs(ydistance) > 3 ? (
|
|
16
|
-
`x - ${(0, util_1.locstr)(mousedown[0], hview)}`,
|
|
17
|
-
react_1.default.createElement("br", null),
|
|
18
|
-
`y - ${(0, util_1.locstr)(viewHeight - mousedown[1], vview)}`,
|
|
19
|
-
react_1.default.createElement("br", null))) : null;
|
|
15
|
+
return mousedown && Math.abs(xdistance) > 3 && Math.abs(ydistance) > 3 ? ((0, jsx_runtime_1.jsxs)(BaseTooltip_1.default, { placement: xdistance < 0 ? 'right' : 'left', clientPoint: { x, y }, children: [`x - ${(0, util_1.locstr)(mousedown[0], hview)}`, (0, jsx_runtime_1.jsx)("br", {}), `y - ${(0, util_1.locstr)(viewHeight - mousedown[1], vview)}`, (0, jsx_runtime_1.jsx)("br", {})] })) : null;
|
|
20
16
|
});
|
|
21
17
|
exports.default = exports.DotplotTooltipClick;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { DotplotViewModel } from '../model';
|
|
1
|
+
import type { DotplotViewModel } from '../model';
|
|
3
2
|
type Coord = [number, number] | undefined;
|
|
4
3
|
declare const DotplotTooltipMouseover: ({ model, mouserect, mouserectClient, xdistance, }: {
|
|
5
4
|
model: DotplotViewModel;
|
|
6
5
|
mouserect: Coord;
|
|
7
6
|
mouserectClient: Coord;
|
|
8
7
|
xdistance: number;
|
|
9
|
-
}) =>
|
|
8
|
+
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
10
9
|
export default DotplotTooltipMouseover;
|
|
@@ -3,18 +3,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const
|
|
7
|
-
const mobx_react_1 = require("mobx-react");
|
|
6
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
7
|
const BaseTooltip_1 = __importDefault(require("@jbrowse/core/ui/BaseTooltip"));
|
|
8
|
+
const mobx_react_1 = require("mobx-react");
|
|
9
9
|
const util_1 = require("./util");
|
|
10
10
|
const DotplotTooltipMouseover = (0, mobx_react_1.observer)(function ({ model, mouserect, mouserectClient, xdistance, }) {
|
|
11
11
|
const { hview, vview, viewHeight } = model;
|
|
12
|
-
return mouserect ? (
|
|
12
|
+
return mouserect ? ((0, jsx_runtime_1.jsxs)(BaseTooltip_1.default, { placement: xdistance < 0 ? 'left' : 'right', clientPoint: mouserectClient
|
|
13
13
|
? { x: mouserectClient[0], y: mouserectClient[1] }
|
|
14
|
-
: undefined },
|
|
15
|
-
`x - ${(0, util_1.locstr)(mouserect[0], hview)}`,
|
|
16
|
-
react_1.default.createElement("br", null),
|
|
17
|
-
`y - ${(0, util_1.locstr)(viewHeight - mouserect[1], vview)}`,
|
|
18
|
-
react_1.default.createElement("br", null))) : null;
|
|
14
|
+
: undefined, children: [`x - ${(0, util_1.locstr)(mouserect[0], hview)}`, (0, jsx_runtime_1.jsx)("br", {}), `y - ${(0, util_1.locstr)(viewHeight - mouserect[1], vview)}`, (0, jsx_runtime_1.jsx)("br", {})] })) : null;
|
|
19
15
|
});
|
|
20
16
|
exports.default = DotplotTooltipMouseover;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { DotplotViewModel } from '../model';
|
|
1
|
+
import type { DotplotViewModel } from '../model';
|
|
3
2
|
declare const DotplotView: ({ model }: {
|
|
4
3
|
model: DotplotViewModel;
|
|
5
|
-
}) =>
|
|
4
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
6
5
|
export default DotplotView;
|
|
@@ -15,26 +15,37 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
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
|
+
})();
|
|
25
35
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
37
|
};
|
|
28
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
const
|
|
39
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
40
|
+
const react_1 = require("react");
|
|
30
41
|
const ui_1 = require("@jbrowse/core/ui");
|
|
31
|
-
const mobx_react_1 = require("mobx-react");
|
|
32
42
|
const mobx_1 = require("mobx");
|
|
43
|
+
const mobx_react_1 = require("mobx-react");
|
|
33
44
|
const mui_1 = require("tss-react/mui");
|
|
34
|
-
const ImportForm_1 = __importDefault(require("./ImportForm"));
|
|
35
|
-
const Header_1 = __importDefault(require("./Header"));
|
|
36
|
-
const Grid_1 = __importDefault(require("./Grid"));
|
|
37
45
|
const Axes_1 = require("./Axes");
|
|
46
|
+
const Grid_1 = __importDefault(require("./Grid"));
|
|
47
|
+
const Header_1 = __importDefault(require("./Header"));
|
|
48
|
+
const ImportForm_1 = __importDefault(require("./ImportForm"));
|
|
38
49
|
const TooltipWhereClicked = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('./DotplotTooltipClick'))));
|
|
39
50
|
const TooltipWhereMouseovered = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('./DotplotTooltipMouseover'))));
|
|
40
51
|
const blank = { left: 0, top: 0, width: 0, height: 0 };
|
|
@@ -60,7 +71,7 @@ const useStyles = (0, mui_1.makeStyles)()(theme => ({
|
|
|
60
71
|
width: '100%',
|
|
61
72
|
gridRow: '1/2',
|
|
62
73
|
gridColumn: '2/2',
|
|
63
|
-
zIndex: 100,
|
|
74
|
+
zIndex: 100,
|
|
64
75
|
'& path': {
|
|
65
76
|
cursor: 'crosshair',
|
|
66
77
|
fill: 'none',
|
|
@@ -78,18 +89,16 @@ const useStyles = (0, mui_1.makeStyles)()(theme => ({
|
|
|
78
89
|
borderTop: '1px solid #fafafa',
|
|
79
90
|
},
|
|
80
91
|
}));
|
|
81
|
-
// produces offsetX/offsetY coordinates from a clientX and an element's
|
|
82
|
-
// getBoundingClientRect
|
|
83
92
|
function getOffset(coord, rect) {
|
|
84
93
|
return coord && [coord[0] - rect.left, coord[1] - rect.top];
|
|
85
94
|
}
|
|
86
95
|
const RenderedComponent = (0, mobx_react_1.observer)(({ model }) => {
|
|
87
96
|
const { classes } = useStyles();
|
|
88
|
-
return (
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
97
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: classes.overlay, children: model.tracks.map(track => {
|
|
98
|
+
const [display] = track.displays;
|
|
99
|
+
const { RenderingComponent } = display;
|
|
100
|
+
return RenderingComponent ? ((0, jsx_runtime_1.jsx)(RenderingComponent, { model: display }, track.configuration.trackId)) : null;
|
|
101
|
+
}) }));
|
|
93
102
|
});
|
|
94
103
|
const DotplotViewInternal = (0, mobx_react_1.observer)(function ({ model, }) {
|
|
95
104
|
var _a, _b;
|
|
@@ -119,7 +128,6 @@ const DotplotViewInternal = (0, mobx_react_1.observer)(function ({ model, }) {
|
|
|
119
128
|
(cursorMode === 'crosshair' && ctrlKeyWasUsed);
|
|
120
129
|
const validSelect = (cursorMode === 'move' && ctrlKeyWasUsed) ||
|
|
121
130
|
(cursorMode === 'crosshair' && !ctrlKeyWasUsed);
|
|
122
|
-
// use non-React wheel handler to properly prevent body scrolling
|
|
123
131
|
(0, react_1.useEffect)(() => {
|
|
124
132
|
function onWheel(event) {
|
|
125
133
|
event.preventDefault();
|
|
@@ -188,8 +196,6 @@ const DotplotViewInternal = (0, mobx_react_1.observer)(function ({ model, }) {
|
|
|
188
196
|
window.addEventListener('keyup', globalCtrlKeyUp);
|
|
189
197
|
};
|
|
190
198
|
}, []);
|
|
191
|
-
// detect a mouseup after a mousedown was submitted, autoremoves mouseup once
|
|
192
|
-
// that single mouseup is set
|
|
193
199
|
(0, react_1.useEffect)(() => {
|
|
194
200
|
function globalMouseUp(event) {
|
|
195
201
|
if (Math.abs(xdistance) > 3 && Math.abs(ydistance) > 3 && validSelect) {
|
|
@@ -207,81 +213,63 @@ const DotplotViewInternal = (0, mobx_react_1.observer)(function ({ model, }) {
|
|
|
207
213
|
}
|
|
208
214
|
return () => { };
|
|
209
215
|
}, [validSelect, mousedown, mouseup, xdistance, ydistance]);
|
|
210
|
-
return (
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
model.zoomInToMouseCoords(mousedown, mouseup);
|
|
259
|
-
}
|
|
260
|
-
// below line is needed to prevent tooltip from sticking
|
|
261
|
-
setMouseOvered(false);
|
|
262
|
-
},
|
|
263
|
-
},
|
|
264
|
-
{
|
|
265
|
-
label: 'Open linear synteny view',
|
|
266
|
-
onClick: () => {
|
|
267
|
-
if (mousedown && mouseup) {
|
|
268
|
-
model.onDotplotView(mousedown, mouseup);
|
|
269
|
-
}
|
|
270
|
-
// below line is needed to prevent tooltip from sticking
|
|
271
|
-
setMouseOvered(false);
|
|
272
|
-
},
|
|
273
|
-
},
|
|
274
|
-
] })),
|
|
275
|
-
react_1.default.createElement(ui_1.ResizeHandle, { onDrag: n => model.setHeight(model.height + n), className: classes.resizeHandle }))));
|
|
216
|
+
return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(Header_1.default, { model: model, selection: !validSelect || !(mousedown && mouserect)
|
|
217
|
+
? undefined
|
|
218
|
+
: {
|
|
219
|
+
width: Math.abs(xdistance),
|
|
220
|
+
height: Math.abs(ydistance),
|
|
221
|
+
} }), (0, jsx_runtime_1.jsxs)("div", { ref: root, className: classes.root, onMouseLeave: () => {
|
|
222
|
+
setMouseOvered(false);
|
|
223
|
+
}, onMouseEnter: () => {
|
|
224
|
+
setMouseOvered(true);
|
|
225
|
+
}, children: [(0, jsx_runtime_1.jsxs)("div", { className: classes.container, children: [(0, jsx_runtime_1.jsx)(Axes_1.VerticalAxis, { model: model }), (0, jsx_runtime_1.jsx)(Axes_1.HorizontalAxis, { model: model }), (0, jsx_runtime_1.jsxs)("div", { ref: ref, className: classes.content, children: [mouseOvered && validSelect ? ((0, jsx_runtime_1.jsx)(react_1.Suspense, { fallback: null, children: (0, jsx_runtime_1.jsx)(TooltipWhereMouseovered, { model: model, mouserect: mouserect, mouserectClient: mouserectClient, xdistance: xdistance }) })) : null, validSelect ? ((0, jsx_runtime_1.jsx)(react_1.Suspense, { fallback: null, children: (0, jsx_runtime_1.jsx)(TooltipWhereClicked, { model: model, mousedown: mousedown, mousedownClient: mousedownClient, xdistance: xdistance, ydistance: ydistance }) })) : null, (0, jsx_runtime_1.jsx)("div", { style: { cursor: ctrlKeyDown ? 'pointer' : cursorMode }, onMouseDown: event => {
|
|
226
|
+
if (event.button === 0) {
|
|
227
|
+
const { clientX, clientY } = event;
|
|
228
|
+
setMouseDownClient([clientX, clientY]);
|
|
229
|
+
setMouseCurrClient([clientX, clientY]);
|
|
230
|
+
setCtrlKeyWasUsed(ctrlKeyDown);
|
|
231
|
+
}
|
|
232
|
+
}, children: (0, jsx_runtime_1.jsx)(Grid_1.default, { model: model, children: validSelect && mousedown && mouserect ? ((0, jsx_runtime_1.jsx)("rect", { fill: "rgba(255,0,0,0.3)", x: Math.min(mouserect[0], mousedown[0]), y: Math.min(mouserect[1], mousedown[1]), width: Math.abs(xdistance), height: Math.abs(ydistance) })) : null }) }), (0, jsx_runtime_1.jsx)("div", { className: classes.spacer })] }), (0, jsx_runtime_1.jsx)(RenderedComponent, { model: model }), (0, jsx_runtime_1.jsx)(ui_1.Menu, { open: Boolean(mouseup), onMenuItemClick: (_, callback) => {
|
|
233
|
+
callback();
|
|
234
|
+
setMouseUpClient(undefined);
|
|
235
|
+
setMouseDownClient(undefined);
|
|
236
|
+
}, onClose: () => {
|
|
237
|
+
setMouseUpClient(undefined);
|
|
238
|
+
setMouseDownClient(undefined);
|
|
239
|
+
}, anchorReference: "anchorPosition", anchorPosition: mouseupClient
|
|
240
|
+
? {
|
|
241
|
+
top: mouseupClient[1] + 50,
|
|
242
|
+
left: mouseupClient[0] + 50,
|
|
243
|
+
}
|
|
244
|
+
: undefined, style: { zIndex: 10000 }, menuItems: [
|
|
245
|
+
{
|
|
246
|
+
label: 'Zoom in',
|
|
247
|
+
onClick: () => {
|
|
248
|
+
if (mousedown && mouseup) {
|
|
249
|
+
model.zoomInToMouseCoords(mousedown, mouseup);
|
|
250
|
+
}
|
|
251
|
+
setMouseOvered(false);
|
|
252
|
+
},
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
label: 'Open linear synteny view',
|
|
256
|
+
onClick: () => {
|
|
257
|
+
if (mousedown && mouseup) {
|
|
258
|
+
model.onDotplotView(mousedown, mouseup);
|
|
259
|
+
}
|
|
260
|
+
setMouseOvered(false);
|
|
261
|
+
},
|
|
262
|
+
},
|
|
263
|
+
] })] }), (0, jsx_runtime_1.jsx)(ui_1.ResizeHandle, { onDrag: n => model.setHeight(model.height + n), className: classes.resizeHandle })] })] }));
|
|
276
264
|
});
|
|
277
265
|
const DotplotView = (0, mobx_react_1.observer)(function ({ model }) {
|
|
278
266
|
const { initialized, loading, error } = model;
|
|
279
267
|
if ((!initialized && !loading) || error) {
|
|
280
|
-
return
|
|
268
|
+
return (0, jsx_runtime_1.jsx)(ImportForm_1.default, { model: model });
|
|
281
269
|
}
|
|
282
270
|
if (loading) {
|
|
283
|
-
return
|
|
271
|
+
return (0, jsx_runtime_1.jsx)(ui_1.LoadingEllipses, { variant: "h6" });
|
|
284
272
|
}
|
|
285
|
-
return
|
|
273
|
+
return (0, jsx_runtime_1.jsx)(DotplotViewInternal, { model: model });
|
|
286
274
|
});
|
|
287
275
|
exports.default = DotplotView;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { DotplotViewModel } from '../model';
|
|
1
|
+
import type { DotplotViewModel } from '../model';
|
|
3
2
|
declare const DotplotWarnings: ({ model, }: {
|
|
4
3
|
model: DotplotViewModel;
|
|
5
|
-
}) =>
|
|
4
|
+
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
6
5
|
export default DotplotWarnings;
|