@jbrowse/plugin-dotplot-view 2.18.0 → 3.0.1
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/DotplotDisplay/components/DotplotDisplay.d.ts +1 -2
- package/dist/DotplotDisplay/components/DotplotDisplay.js +6 -11
- package/dist/DotplotDisplay/stateModelFactory.d.ts +1 -2
- package/dist/DotplotDisplay/stateModelFactory.js +2 -3
- package/dist/DotplotRenderer/DotplotRenderer.d.ts +3 -3
- package/dist/DotplotRenderer/DotplotRenderer.js +17 -7
- package/dist/DotplotRenderer/components/DotplotRendering.d.ts +1 -2
- package/dist/DotplotRenderer/components/DotplotRendering.js +2 -5
- package/dist/DotplotView/components/Axes.d.ts +4 -5
- package/dist/DotplotView/components/Axes.js +23 -36
- package/dist/DotplotView/components/CursorIcon.d.ts +2 -3
- package/dist/DotplotView/components/CursorIcon.js +3 -5
- package/dist/DotplotView/components/DotplotControls.d.ts +1 -2
- package/dist/DotplotView/components/DotplotControls.js +89 -91
- package/dist/DotplotView/components/DotplotTooltipClick.d.ts +1 -2
- package/dist/DotplotView/components/DotplotTooltipClick.js +2 -6
- package/dist/DotplotView/components/DotplotTooltipMouseover.d.ts +1 -2
- package/dist/DotplotView/components/DotplotTooltipMouseover.js +3 -7
- package/dist/DotplotView/components/DotplotView.d.ts +1 -2
- package/dist/DotplotView/components/DotplotView.js +75 -80
- package/dist/DotplotView/components/DotplotWarnings.d.ts +1 -2
- package/dist/DotplotView/components/DotplotWarnings.js +26 -20
- package/dist/DotplotView/components/ExportSvgDialog.d.ts +1 -2
- package/dist/DotplotView/components/ExportSvgDialog.js +31 -64
- package/dist/DotplotView/components/Grid.d.ts +2 -3
- package/dist/DotplotView/components/Grid.js +17 -28
- package/dist/DotplotView/components/Header.d.ts +1 -2
- package/dist/DotplotView/components/Header.js +2 -21
- 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 +3 -5
- package/dist/DotplotView/components/ImportForm/ImportSyntenyTrackSelector.js +12 -38
- 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 +2 -3
- package/dist/DotplotView/components/ImportForm/index.js +43 -92
- package/dist/DotplotView/components/PanButtons.d.ts +1 -2
- package/dist/DotplotView/components/PanButtons.js +14 -32
- package/dist/DotplotView/components/WarningDialog.d.ts +1 -2
- package/dist/DotplotView/components/WarningDialog.js +2 -9
- package/dist/DotplotView/index.js +17 -7
- package/dist/DotplotView/model.d.ts +6 -4
- package/dist/DotplotView/model.js +40 -30
- package/dist/DotplotView/svgcomponents/SVGBackground.d.ts +1 -2
- package/dist/DotplotView/svgcomponents/SVGBackground.js +2 -5
- package/dist/DotplotView/svgcomponents/SVGDotplotView.js +2 -16
- package/dist/DotplotView/types.d.ts +12 -0
- package/dist/DotplotView/types.js +2 -0
- package/dist/ServerSideRenderedBlockContent.d.ts +1 -2
- package/dist/ServerSideRenderedBlockContent.js +9 -34
- package/dist/ServerSideSyntenyRendering.d.ts +1 -2
- package/dist/ServerSideSyntenyRendering.js +3 -25
- package/esm/DotplotDisplay/components/DotplotDisplay.d.ts +1 -2
- package/esm/DotplotDisplay/components/DotplotDisplay.js +6 -8
- package/esm/DotplotDisplay/stateModelFactory.d.ts +1 -2
- package/esm/DotplotDisplay/stateModelFactory.js +2 -3
- package/esm/DotplotRenderer/DotplotRenderer.d.ts +3 -3
- package/esm/DotplotRenderer/components/DotplotRendering.d.ts +1 -2
- package/esm/DotplotRenderer/components/DotplotRendering.js +2 -2
- package/esm/DotplotView/components/Axes.d.ts +4 -5
- package/esm/DotplotView/components/Axes.js +23 -33
- package/esm/DotplotView/components/CursorIcon.d.ts +2 -3
- package/esm/DotplotView/components/CursorIcon.js +3 -5
- package/esm/DotplotView/components/DotplotControls.d.ts +1 -2
- package/esm/DotplotView/components/DotplotControls.js +89 -91
- package/esm/DotplotView/components/DotplotTooltipClick.d.ts +1 -2
- package/esm/DotplotView/components/DotplotTooltipClick.js +2 -6
- package/esm/DotplotView/components/DotplotTooltipMouseover.d.ts +1 -2
- package/esm/DotplotView/components/DotplotTooltipMouseover.js +3 -7
- package/esm/DotplotView/components/DotplotView.d.ts +1 -2
- package/esm/DotplotView/components/DotplotView.js +58 -73
- package/esm/DotplotView/components/DotplotWarnings.d.ts +1 -2
- package/esm/DotplotView/components/DotplotWarnings.js +9 -13
- package/esm/DotplotView/components/ExportSvgDialog.d.ts +1 -2
- package/esm/DotplotView/components/ExportSvgDialog.js +31 -41
- package/esm/DotplotView/components/Grid.d.ts +2 -3
- package/esm/DotplotView/components/Grid.js +17 -25
- package/esm/DotplotView/components/Header.d.ts +1 -2
- package/esm/DotplotView/components/Header.js +2 -21
- 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 +3 -5
- package/esm/DotplotView/components/ImportForm/ImportSyntenyTrackSelector.js +12 -15
- 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 +2 -3
- package/esm/DotplotView/components/ImportForm/index.js +45 -71
- package/esm/DotplotView/components/PanButtons.d.ts +1 -2
- package/esm/DotplotView/components/PanButtons.js +14 -32
- package/esm/DotplotView/components/WarningDialog.d.ts +1 -2
- package/esm/DotplotView/components/WarningDialog.js +2 -6
- package/esm/DotplotView/model.d.ts +6 -4
- package/esm/DotplotView/model.js +25 -25
- package/esm/DotplotView/svgcomponents/SVGBackground.d.ts +1 -2
- package/esm/DotplotView/svgcomponents/SVGBackground.js +2 -2
- package/esm/DotplotView/svgcomponents/SVGDotplotView.js +2 -16
- package/esm/DotplotView/types.d.ts +12 -0
- package/esm/DotplotView/types.js +1 -0
- package/esm/ServerSideRenderedBlockContent.d.ts +1 -2
- package/esm/ServerSideRenderedBlockContent.js +9 -11
- package/esm/ServerSideSyntenyRendering.d.ts +1 -2
- package/esm/ServerSideSyntenyRendering.js +3 -2
- package/package.json +10 -10
- 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
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import type { DotplotDisplayModel } from '../stateModelFactory';
|
|
3
2
|
declare const DotplotDisplay: (props: {
|
|
4
3
|
model: DotplotDisplayModel;
|
|
5
4
|
children?: React.ReactNode;
|
|
6
|
-
}) =>
|
|
5
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
7
6
|
export default DotplotDisplay;
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const
|
|
3
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
4
|
const util_1 = require("@jbrowse/core/util");
|
|
8
5
|
const mobx_react_1 = require("mobx-react");
|
|
9
6
|
const DotplotDisplay = (0, mobx_react_1.observer)(function DotplotDisplay(props) {
|
|
@@ -12,12 +9,10 @@ const DotplotDisplay = (0, mobx_react_1.observer)(function DotplotDisplay(props)
|
|
|
12
9
|
const view = (0, util_1.getContainingView)(model);
|
|
13
10
|
const top = view.vview.offsetPx - offsetY;
|
|
14
11
|
const left = -(view.hview.offsetPx - offsetX);
|
|
15
|
-
return (
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
} }),
|
|
21
|
-
children));
|
|
12
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: { position: 'relative' }, children: [(0, jsx_runtime_1.jsx)(model.ReactComponent2, { ...props, style: {
|
|
13
|
+
position: 'absolute',
|
|
14
|
+
top,
|
|
15
|
+
left,
|
|
16
|
+
} }), children] }));
|
|
22
17
|
});
|
|
23
18
|
exports.default = DotplotDisplay;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import type { ExportSvgOptions } from '../DotplotView/model';
|
|
3
2
|
import type { AnyConfigurationSchemaType } from '@jbrowse/core/configuration';
|
|
4
3
|
import type { ThemeOptions } from '@mui/material';
|
|
@@ -87,7 +86,7 @@ export declare function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
87
86
|
} & {
|
|
88
87
|
renderSvg(opts: ExportSvgOptions & {
|
|
89
88
|
theme?: ThemeOptions;
|
|
90
|
-
}): Promise<
|
|
89
|
+
}): Promise<import("react/jsx-runtime").JSX.Element | null>;
|
|
91
90
|
} & {
|
|
92
91
|
afterAttach(): void;
|
|
93
92
|
setLoading(stopToken?: string): void;
|
|
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.stateModelFactory = stateModelFactory;
|
|
7
|
-
const
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
8
|
const configuration_1 = require("@jbrowse/core/configuration");
|
|
9
9
|
const models_1 = require("@jbrowse/core/pluggableElementTypes/models");
|
|
10
10
|
const util_1 = require("@jbrowse/core/util");
|
|
@@ -62,8 +62,7 @@ function stateModelFactory(configSchema) {
|
|
|
62
62
|
const { hview, vview } = (0, util_1.getContainingView)(self);
|
|
63
63
|
const offX = -hview.offsetPx + rendering.offsetX;
|
|
64
64
|
const offY = -vview.offsetPx + rendering.offsetY;
|
|
65
|
-
return (
|
|
66
|
-
react_1.default.createElement(util_1.ReactRendering, { rendering: rendering })));
|
|
65
|
+
return ((0, jsx_runtime_1.jsx)("g", { transform: `translate(${offX} ${-offY})`, children: (0, jsx_runtime_1.jsx)(util_1.ReactRendering, { rendering: rendering }) }));
|
|
67
66
|
},
|
|
68
67
|
}))
|
|
69
68
|
.actions(self => ({
|
|
@@ -36,7 +36,7 @@ export default class DotplotRenderer extends ComparativeRenderer {
|
|
|
36
36
|
bpPerPxX: number;
|
|
37
37
|
bpPerPxY: number;
|
|
38
38
|
canvasRecordedData: any;
|
|
39
|
-
reactElement?:
|
|
39
|
+
reactElement?: React.ReactElement;
|
|
40
40
|
html?: string;
|
|
41
41
|
} | {
|
|
42
42
|
height: number;
|
|
@@ -45,7 +45,7 @@ export default class DotplotRenderer extends ComparativeRenderer {
|
|
|
45
45
|
offsetY: number;
|
|
46
46
|
bpPerPxX: number;
|
|
47
47
|
bpPerPxY: number;
|
|
48
|
-
reactElement:
|
|
48
|
+
reactElement: import("react/jsx-runtime").JSX.Element;
|
|
49
49
|
html?: string;
|
|
50
50
|
} | {
|
|
51
51
|
height: number;
|
|
@@ -55,7 +55,7 @@ export default class DotplotRenderer extends ComparativeRenderer {
|
|
|
55
55
|
bpPerPxX: number;
|
|
56
56
|
bpPerPxY: number;
|
|
57
57
|
imageData: any;
|
|
58
|
-
reactElement?:
|
|
58
|
+
reactElement?: React.ReactElement;
|
|
59
59
|
html?: string;
|
|
60
60
|
}>;
|
|
61
61
|
}
|
|
@@ -15,13 +15,23 @@ 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
|
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import type { DotplotRenderArgsDeserialized } from '../DotplotRenderer';
|
|
3
|
-
declare const DotplotRendering: (props: DotplotRenderArgsDeserialized) =>
|
|
2
|
+
declare const DotplotRendering: (props: DotplotRenderArgsDeserialized) => import("react/jsx-runtime").JSX.Element;
|
|
4
3
|
export default DotplotRendering;
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const
|
|
3
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
4
|
const ui_1 = require("@jbrowse/core/ui");
|
|
8
5
|
const mobx_react_1 = require("mobx-react");
|
|
9
6
|
const DotplotRendering = (0, mobx_react_1.observer)(function (props) {
|
|
10
|
-
return
|
|
7
|
+
return (0, jsx_runtime_1.jsx)(ui_1.PrerenderedCanvas, { ...props });
|
|
11
8
|
});
|
|
12
9
|
exports.default = DotplotRendering;
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import type { DotplotViewModel } from '../model';
|
|
3
2
|
export declare const HorizontalAxis: ({ model, }: {
|
|
4
3
|
model: DotplotViewModel;
|
|
5
|
-
}) =>
|
|
4
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
6
5
|
export declare const HorizontalAxisRaw: ({ model, }: {
|
|
7
6
|
model: DotplotViewModel;
|
|
8
|
-
}) =>
|
|
7
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
9
8
|
export declare const VerticalAxis: ({ model, }: {
|
|
10
9
|
model: DotplotViewModel;
|
|
11
|
-
}) =>
|
|
10
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
12
11
|
export declare const VerticalAxisRaw: ({ model, }: {
|
|
13
12
|
model: DotplotViewModel;
|
|
14
|
-
}) =>
|
|
13
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.VerticalAxisRaw = exports.VerticalAxis = exports.HorizontalAxisRaw = exports.HorizontalAxis = void 0;
|
|
7
|
-
const
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
5
|
const util_1 = require("@jbrowse/core/util");
|
|
9
6
|
const Base1DUtils_1 = require("@jbrowse/core/util/Base1DUtils");
|
|
10
7
|
const material_1 = require("@mui/material");
|
|
@@ -29,8 +26,7 @@ const useStyles = (0, mui_1.makeStyles)()(() => ({
|
|
|
29
26
|
exports.HorizontalAxis = (0, mobx_react_1.observer)(function ({ model, }) {
|
|
30
27
|
const { viewWidth, borderY } = model;
|
|
31
28
|
const { classes } = useStyles();
|
|
32
|
-
return (
|
|
33
|
-
react_1.default.createElement(exports.HorizontalAxisRaw, { model: model })));
|
|
29
|
+
return ((0, jsx_runtime_1.jsx)("svg", { width: viewWidth, height: borderY, className: classes.htext, children: (0, jsx_runtime_1.jsx)(exports.HorizontalAxisRaw, { model: model }) }));
|
|
34
30
|
});
|
|
35
31
|
exports.HorizontalAxisRaw = (0, mobx_react_1.observer)(function ({ model, }) {
|
|
36
32
|
const { viewWidth, borderX, borderY, hview, htextRotation, hticks } = model;
|
|
@@ -57,26 +53,21 @@ exports.HorizontalAxisRaw = (0, mobx_react_1.observer)(function ({ model, }) {
|
|
|
57
53
|
})
|
|
58
54
|
.filter(f => f[1] !== undefined)
|
|
59
55
|
.map(f => [f[0], f[1] - offsetPx]);
|
|
60
|
-
return (
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
ticks
|
|
71
|
-
.filter(t => t[0].type === 'major')
|
|
72
|
-
.map(([tick, x]) => x > 10 && x < width ? (react_1.default.createElement("text", { x: x - 7, y: 0, transform: `rotate(${htextRotation},${x},0)`, key: `text-${JSON.stringify(tick)}`, fontSize: 11, dominantBaseline: "middle", textAnchor: "end", ...(0, util_1.getFillProps)(theme.palette.text.primary) }, (0, util_1.getTickDisplayStr)(tick.base + 1, bpPerPx))) : null),
|
|
73
|
-
react_1.default.createElement("text", { y: borderY - 12, x: (viewWidth - borderX) / 2, textAnchor: "middle", fontSize: 11, dominantBaseline: "hanging", ...(0, util_1.getFillProps)(theme.palette.text.primary) }, hview.assemblyNames.join(','))));
|
|
56
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [dblocks
|
|
57
|
+
.filter(region => !hide.has(region.key))
|
|
58
|
+
.map(region => {
|
|
59
|
+
const x = region.offsetPx;
|
|
60
|
+
const y = 0;
|
|
61
|
+
const xoff = Math.floor(x - hview.offsetPx);
|
|
62
|
+
return ((0, jsx_runtime_1.jsx)("text", { transform: `rotate(${htextRotation},${xoff},${y})`, x: xoff, y: y + 1, fontSize: 11, dominantBaseline: "hanging", textAnchor: "end", ...(0, util_1.getFillProps)(theme.palette.text.primary), children: region.refName }, JSON.stringify(region)));
|
|
63
|
+
}), ticks.map(([tick, x]) => x > 0 && x < width ? ((0, jsx_runtime_1.jsx)("line", { x1: x, x2: x, y1: 0, y2: tick.type === 'major' ? 6 : 4, strokeWidth: 1, ...(0, util_1.getFillProps)(theme.palette.text.primary) }, `line-${JSON.stringify(tick)}`)) : null), ticks
|
|
64
|
+
.filter(t => t[0].type === 'major')
|
|
65
|
+
.map(([tick, x]) => x > 10 && x < width ? ((0, jsx_runtime_1.jsx)("text", { x: x - 7, y: 0, transform: `rotate(${htextRotation},${x},0)`, fontSize: 11, dominantBaseline: "middle", textAnchor: "end", ...(0, util_1.getFillProps)(theme.palette.text.primary), children: (0, util_1.getTickDisplayStr)(tick.base + 1, bpPerPx) }, `text-${JSON.stringify(tick)}`)) : null), (0, jsx_runtime_1.jsx)("text", { y: borderY - 12, x: (viewWidth - borderX) / 2, textAnchor: "middle", fontSize: 11, dominantBaseline: "hanging", ...(0, util_1.getFillProps)(theme.palette.text.primary), children: hview.assemblyNames.join(',') })] }));
|
|
74
66
|
});
|
|
75
67
|
exports.VerticalAxis = (0, mobx_react_1.observer)(function ({ model, }) {
|
|
76
68
|
const { borderX, viewHeight } = model;
|
|
77
69
|
const { classes } = useStyles();
|
|
78
|
-
return (
|
|
79
|
-
react_1.default.createElement(exports.VerticalAxisRaw, { model: model })));
|
|
70
|
+
return ((0, jsx_runtime_1.jsx)("svg", { className: classes.vtext, width: borderX, height: viewHeight, children: (0, jsx_runtime_1.jsx)(exports.VerticalAxisRaw, { model: model }) }));
|
|
80
71
|
});
|
|
81
72
|
exports.VerticalAxisRaw = (0, mobx_react_1.observer)(function ({ model, }) {
|
|
82
73
|
const { viewHeight, borderX, borderY, vview, vtextRotation, vticks } = model;
|
|
@@ -103,18 +94,14 @@ exports.VerticalAxisRaw = (0, mobx_react_1.observer)(function ({ model, }) {
|
|
|
103
94
|
})
|
|
104
95
|
.filter(f => f[1] !== undefined)
|
|
105
96
|
.map(f => [f[0], f[1] - offsetPx]);
|
|
106
|
-
return (
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
ticks
|
|
117
|
-
.filter(t => t[0].type === 'major')
|
|
118
|
-
.map(([tick, y]) => y > 10 && y < viewHeight ? (react_1.default.createElement("text", { y: viewHeight - y - 3, x: borderX - 7, key: `text-${JSON.stringify(tick)}`, textAnchor: "end", dominantBaseline: "hanging", fontSize: 11, ...(0, util_1.getFillProps)(theme.palette.text.primary) }, (0, util_1.getTickDisplayStr)(tick.base + 1, bpPerPx))) : null),
|
|
119
|
-
react_1.default.createElement("text", { y: (viewHeight - borderY) / 2, x: 12, transform: `rotate(-90,12,${(viewHeight - borderY) / 2})`, textAnchor: "middle", fontSize: 11, ...(0, util_1.getFillProps)(theme.palette.text.primary) }, vview.assemblyNames.join(','))));
|
|
97
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [dblocks
|
|
98
|
+
.filter(region => !hide.has(region.key))
|
|
99
|
+
.map(region => {
|
|
100
|
+
const y = region.offsetPx;
|
|
101
|
+
const x = borderX;
|
|
102
|
+
const yoff = Math.floor(viewHeight - y + offsetPx);
|
|
103
|
+
return ((0, jsx_runtime_1.jsx)("text", { transform: `rotate(${vtextRotation},${x},${y})`, x: x, y: yoff, fontSize: 11, textAnchor: "end", ...(0, util_1.getFillProps)(theme.palette.text.primary), children: region.refName }, JSON.stringify(region)));
|
|
104
|
+
}), ticks.map(([tick, y]) => y > 0 ? ((0, jsx_runtime_1.jsx)("line", { y1: viewHeight - y, y2: viewHeight - y, x1: borderX, x2: borderX - (tick.type === 'major' ? 6 : 4), strokeWidth: 1, ...(0, util_1.getStrokeProps)(theme.palette.grey[400]) }, `line-${JSON.stringify(tick)}`)) : null), ticks
|
|
105
|
+
.filter(t => t[0].type === 'major')
|
|
106
|
+
.map(([tick, y]) => y > 10 && y < viewHeight ? ((0, jsx_runtime_1.jsx)("text", { y: viewHeight - y - 3, x: borderX - 7, textAnchor: "end", dominantBaseline: "hanging", fontSize: 11, ...(0, util_1.getFillProps)(theme.palette.text.primary), children: (0, util_1.getTickDisplayStr)(tick.base + 1, bpPerPx) }, `text-${JSON.stringify(tick)}`)) : null), (0, jsx_runtime_1.jsx)("text", { y: (viewHeight - borderY) / 2, x: 12, transform: `rotate(-90,12,${(viewHeight - borderY) / 2})`, textAnchor: "middle", fontSize: 11, ...(0, util_1.getFillProps)(theme.palette.text.primary), children: vview.assemblyNames.join(',') })] }));
|
|
120
107
|
});
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import type { SvgIconProps } from '@mui/material/SvgIcon';
|
|
3
|
-
export declare function CursorMove(props: SvgIconProps):
|
|
4
|
-
export declare function CursorMouse(props: SvgIconProps):
|
|
2
|
+
export declare function CursorMove(props: SvgIconProps): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare function CursorMouse(props: SvgIconProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -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
|
|
8
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
9
9
|
const SvgIcon_1 = __importDefault(require("@mui/material/SvgIcon"));
|
|
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
|
}
|
|
@@ -3,115 +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
|
|
6
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
7
|
const CascadingMenuButton_1 = __importDefault(require("@jbrowse/core/ui/CascadingMenuButton"));
|
|
8
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"));
|
|
9
11
|
const MoreVert_1 = __importDefault(require("@mui/icons-material/MoreVert"));
|
|
12
|
+
const SettingsOverscan_1 = __importDefault(require("@mui/icons-material/SettingsOverscan"));
|
|
10
13
|
const ZoomIn_1 = __importDefault(require("@mui/icons-material/ZoomIn"));
|
|
11
14
|
const ZoomOut_1 = __importDefault(require("@mui/icons-material/ZoomOut"));
|
|
12
15
|
const material_1 = require("@mui/material");
|
|
13
16
|
const mobx_react_1 = require("mobx-react");
|
|
14
17
|
const CursorIcon_1 = require("./CursorIcon");
|
|
15
18
|
const DotplotControls = (0, mobx_react_1.observer)(function ({ model, }) {
|
|
16
|
-
return (
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
react_1.default.createElement(CascadingMenuButton_1.default, { menuItems: [
|
|
28
|
-
{
|
|
29
|
-
onClick: () => {
|
|
30
|
-
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
|
+
},
|
|
31
30
|
},
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
31
|
+
{
|
|
32
|
+
label: 'Rectangular view - same total bp',
|
|
33
|
+
icon: CropLandscape_1.default,
|
|
34
|
+
onClick: () => {
|
|
35
|
+
model.squareViewProportional();
|
|
36
|
+
},
|
|
37
37
|
},
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
38
|
+
{
|
|
39
|
+
label: 'Show all regions',
|
|
40
|
+
icon: SettingsOverscan_1.default,
|
|
41
|
+
onClick: () => {
|
|
42
|
+
model.showAllRegions();
|
|
43
|
+
},
|
|
43
44
|
},
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
45
|
+
{
|
|
46
|
+
type: 'checkbox',
|
|
47
|
+
label: 'Draw CIGAR',
|
|
48
|
+
checked: model.drawCigar,
|
|
49
|
+
onClick: () => {
|
|
50
|
+
model.setDrawCigar(!model.drawCigar);
|
|
51
|
+
},
|
|
49
52
|
},
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
53
|
+
{
|
|
54
|
+
label: 'Show pan buttons',
|
|
55
|
+
type: 'checkbox',
|
|
56
|
+
checked: model.showPanButtons,
|
|
57
|
+
onClick: () => {
|
|
58
|
+
model.setShowPanButtons(!model.showPanButtons);
|
|
59
|
+
},
|
|
57
60
|
},
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
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
|
+
},
|
|
68
72
|
},
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
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
|
+
},
|
|
77
81
|
},
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
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
|
+
},
|
|
91
94
|
},
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
95
|
+
{
|
|
96
|
+
label: 'Zooms view',
|
|
97
|
+
type: 'radio',
|
|
98
|
+
checked: model.wheelMode === 'zoom',
|
|
99
|
+
onClick: () => {
|
|
100
|
+
model.setWheelMode('zoom');
|
|
101
|
+
},
|
|
99
102
|
},
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
103
|
+
{
|
|
104
|
+
label: 'Disable',
|
|
105
|
+
type: 'radio',
|
|
106
|
+
checked: model.wheelMode === 'none',
|
|
107
|
+
onClick: () => {
|
|
108
|
+
model.setWheelMode('none');
|
|
109
|
+
},
|
|
107
110
|
},
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
},
|
|
112
|
-
],
|
|
113
|
-
},
|
|
114
|
-
] },
|
|
115
|
-
react_1.default.createElement(MoreVert_1.default, null))));
|
|
111
|
+
],
|
|
112
|
+
},
|
|
113
|
+
], children: (0, jsx_runtime_1.jsx)(MoreVert_1.default, {}) })] }));
|
|
116
114
|
});
|
|
117
115
|
exports.default = DotplotControls;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import type { DotplotViewModel } from '../model';
|
|
3
2
|
type Coord = [number, number] | undefined;
|
|
4
3
|
export declare const DotplotTooltipClick: ({ model, mousedown, mousedownClient, xdistance, ydistance, }: {
|
|
@@ -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,7 +4,7 @@ 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
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
8
|
const BaseTooltip_1 = __importDefault(require("@jbrowse/core/ui/BaseTooltip"));
|
|
9
9
|
const mobx_react_1 = require("mobx-react");
|
|
10
10
|
const util_1 = require("./util");
|
|
@@ -12,10 +12,6 @@ exports.DotplotTooltipClick = (0, mobx_react_1.observer)(function ({ model, mous
|
|
|
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,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import type { DotplotViewModel } from '../model';
|
|
3
2
|
type Coord = [number, number] | undefined;
|
|
4
3
|
declare const DotplotTooltipMouseover: ({ model, mouserect, mouserectClient, xdistance, }: {
|
|
@@ -6,5 +5,5 @@ declare const DotplotTooltipMouseover: ({ model, mouserect, mouserectClient, xdi
|
|
|
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
|
|
6
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
7
|
const BaseTooltip_1 = __importDefault(require("@jbrowse/core/ui/BaseTooltip"));
|
|
8
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;
|