@jbrowse/plugin-dotplot-view 2.16.1 → 2.18.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 +1 -1
- package/dist/DotplotDisplay/components/DotplotDisplay.js +1 -1
- 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 +7 -43
- package/dist/DotplotDisplay/stateModelFactory.js +55 -97
- package/dist/DotplotReadVsRef/DotplotReadVsRef.d.ts +2 -2
- package/dist/DotplotReadVsRef/DotplotReadVsRef.js +16 -16
- 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 +5 -4
- package/dist/DotplotRenderer/DotplotRenderer.js +1 -2
- package/dist/DotplotRenderer/components/DotplotRendering.d.ts +1 -1
- 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 +1 -1
- package/dist/DotplotView/components/Axes.js +3 -4
- package/dist/DotplotView/components/CursorIcon.d.ts +1 -1
- package/dist/DotplotView/components/CursorIcon.js +1 -1
- package/dist/DotplotView/components/DotplotControls.d.ts +1 -1
- package/dist/DotplotView/components/DotplotControls.js +5 -6
- package/dist/DotplotView/components/DotplotTooltipClick.d.ts +1 -1
- package/dist/DotplotView/components/DotplotTooltipClick.js +1 -1
- package/dist/DotplotView/components/DotplotTooltipMouseover.d.ts +1 -1
- package/dist/DotplotView/components/DotplotTooltipMouseover.js +1 -1
- package/dist/DotplotView/components/DotplotView.d.ts +1 -1
- package/dist/DotplotView/components/DotplotView.js +5 -12
- package/dist/DotplotView/components/DotplotWarnings.d.ts +1 -1
- package/dist/DotplotView/components/DotplotWarnings.js +0 -1
- package/dist/DotplotView/components/ExportSvgDialog.d.ts +1 -1
- package/dist/DotplotView/components/ExportSvgDialog.js +2 -4
- package/dist/DotplotView/components/Grid.d.ts +1 -1
- package/dist/DotplotView/components/Grid.js +2 -4
- package/dist/DotplotView/components/Header.d.ts +1 -1
- package/dist/DotplotView/components/Header.js +2 -2
- package/dist/DotplotView/components/ImportForm/ImportCustomTrack.d.ts +2 -2
- package/dist/DotplotView/components/ImportForm/ImportCustomTrack.js +1 -1
- package/dist/DotplotView/components/ImportForm/ImportSyntenyTrackSelector.d.ts +1 -1
- package/dist/DotplotView/components/ImportForm/ImportSyntenyTrackSelector.js +5 -10
- package/dist/DotplotView/components/ImportForm/index.d.ts +1 -1
- package/dist/DotplotView/components/ImportForm/index.js +4 -5
- package/dist/DotplotView/components/ImportForm/util.js +1 -3
- package/dist/DotplotView/components/PanButtons.d.ts +1 -1
- package/dist/DotplotView/components/PanButtons.js +3 -4
- package/dist/DotplotView/components/WarningDialog.d.ts +6 -5
- package/dist/DotplotView/components/WarningDialog.js +10 -6
- 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 +0 -1
- package/dist/DotplotView/model.d.ts +5 -129
- package/dist/DotplotView/model.js +6 -192
- package/dist/DotplotView/svgcomponents/SVGBackground.js +1 -1
- package/dist/DotplotView/svgcomponents/SVGDotplotView.d.ts +1 -1
- package/dist/DotplotView/svgcomponents/SVGDotplotView.js +5 -9
- package/dist/LaunchDotplotView.d.ts +1 -1
- package/dist/LaunchDotplotView.js +1 -4
- package/dist/ServerSideRenderedBlockContent.d.ts +2 -1
- package/dist/ServerSideRenderedBlockContent.js +2 -3
- package/dist/ServerSideSyntenyRendering.d.ts +0 -4
- package/dist/ServerSideSyntenyRendering.js +1 -1
- 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 +1 -1
- package/esm/DotplotDisplay/components/DotplotDisplay.js +1 -1
- 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 +7 -43
- package/esm/DotplotDisplay/stateModelFactory.js +56 -98
- package/esm/DotplotReadVsRef/DotplotReadVsRef.d.ts +2 -2
- package/esm/DotplotReadVsRef/DotplotReadVsRef.js +18 -18
- 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 +5 -4
- package/esm/DotplotRenderer/DotplotRenderer.js +1 -2
- package/esm/DotplotRenderer/components/DotplotRendering.d.ts +1 -1
- 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 +1 -1
- package/esm/DotplotView/components/Axes.js +3 -4
- package/esm/DotplotView/components/CursorIcon.d.ts +1 -1
- package/esm/DotplotView/components/CursorIcon.js +1 -1
- package/esm/DotplotView/components/DotplotControls.d.ts +1 -1
- package/esm/DotplotView/components/DotplotControls.js +5 -6
- package/esm/DotplotView/components/DotplotTooltipClick.d.ts +1 -1
- package/esm/DotplotView/components/DotplotTooltipClick.js +1 -1
- package/esm/DotplotView/components/DotplotTooltipMouseover.d.ts +1 -1
- package/esm/DotplotView/components/DotplotTooltipMouseover.js +1 -1
- package/esm/DotplotView/components/DotplotView.d.ts +1 -1
- package/esm/DotplotView/components/DotplotView.js +6 -13
- package/esm/DotplotView/components/DotplotWarnings.d.ts +1 -1
- package/esm/DotplotView/components/DotplotWarnings.js +0 -1
- package/esm/DotplotView/components/ExportSvgDialog.d.ts +1 -1
- package/esm/DotplotView/components/ExportSvgDialog.js +2 -4
- package/esm/DotplotView/components/Grid.d.ts +1 -1
- package/esm/DotplotView/components/Grid.js +2 -4
- package/esm/DotplotView/components/Header.d.ts +1 -1
- package/esm/DotplotView/components/Header.js +2 -2
- package/esm/DotplotView/components/ImportForm/ImportCustomTrack.d.ts +2 -2
- package/esm/DotplotView/components/ImportForm/ImportCustomTrack.js +2 -2
- package/esm/DotplotView/components/ImportForm/ImportSyntenyTrackSelector.d.ts +1 -1
- package/esm/DotplotView/components/ImportForm/ImportSyntenyTrackSelector.js +6 -11
- package/esm/DotplotView/components/ImportForm/index.d.ts +1 -1
- package/esm/DotplotView/components/ImportForm/index.js +6 -7
- package/esm/DotplotView/components/ImportForm/util.js +1 -3
- package/esm/DotplotView/components/PanButtons.d.ts +1 -1
- package/esm/DotplotView/components/PanButtons.js +3 -4
- package/esm/DotplotView/components/WarningDialog.d.ts +6 -5
- package/esm/DotplotView/components/WarningDialog.js +10 -6
- 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 +5 -129
- package/esm/DotplotView/model.js +7 -193
- package/esm/DotplotView/svgcomponents/SVGBackground.js +1 -1
- package/esm/DotplotView/svgcomponents/SVGDotplotView.d.ts +1 -1
- package/esm/DotplotView/svgcomponents/SVGDotplotView.js +5 -9
- package/esm/LaunchDotplotView.d.ts +1 -1
- package/esm/LaunchDotplotView.js +1 -4
- package/esm/ServerSideRenderedBlockContent.d.ts +2 -1
- package/esm/ServerSideRenderedBlockContent.js +2 -3
- package/esm/ServerSideSyntenyRendering.d.ts +0 -4
- package/esm/ServerSideSyntenyRendering.js +2 -2
- 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
|
@@ -1,57 +1,36 @@
|
|
|
1
1
|
declare const _default: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
2
|
-
/**
|
|
3
|
-
* #slot
|
|
4
|
-
*/
|
|
5
2
|
color: {
|
|
6
3
|
type: string;
|
|
7
4
|
description: string;
|
|
8
5
|
defaultValue: string;
|
|
9
6
|
contextVariable: string[];
|
|
10
7
|
};
|
|
11
|
-
/**
|
|
12
|
-
* #slot
|
|
13
|
-
*/
|
|
14
8
|
posColor: {
|
|
15
9
|
type: string;
|
|
16
10
|
description: string;
|
|
17
11
|
defaultValue: string;
|
|
18
12
|
};
|
|
19
|
-
/**
|
|
20
|
-
* #slot
|
|
21
|
-
*/
|
|
22
13
|
negColor: {
|
|
23
14
|
type: string;
|
|
24
15
|
description: string;
|
|
25
16
|
defaultValue: string;
|
|
26
17
|
};
|
|
27
|
-
/**
|
|
28
|
-
* #slot
|
|
29
|
-
*/
|
|
30
18
|
lineWidth: {
|
|
31
19
|
type: string;
|
|
32
20
|
description: string;
|
|
33
21
|
defaultValue: number;
|
|
34
22
|
};
|
|
35
|
-
/**
|
|
36
|
-
* #slot
|
|
37
|
-
*/
|
|
38
23
|
colorBy: {
|
|
39
24
|
type: string;
|
|
40
25
|
model: import("mobx-state-tree").ISimpleType<string>;
|
|
41
26
|
description: string;
|
|
42
27
|
defaultValue: string;
|
|
43
28
|
};
|
|
44
|
-
/**
|
|
45
|
-
* #slot
|
|
46
|
-
*/
|
|
47
29
|
thresholdsPalette: {
|
|
48
30
|
type: string;
|
|
49
31
|
defaultValue: string[];
|
|
50
32
|
description: string;
|
|
51
33
|
};
|
|
52
|
-
/**
|
|
53
|
-
* #slot
|
|
54
|
-
*/
|
|
55
34
|
thresholds: {
|
|
56
35
|
type: string;
|
|
57
36
|
defaultValue: string[];
|
|
@@ -2,48 +2,29 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const configuration_1 = require("@jbrowse/core/configuration");
|
|
4
4
|
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
5
|
-
|
|
6
|
-
* #config DotplotRenderer
|
|
7
|
-
* #category renderer
|
|
8
|
-
*/
|
|
9
|
-
function x() { } // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
5
|
+
function x() { }
|
|
10
6
|
exports.default = (0, configuration_1.ConfigurationSchema)('DotplotRenderer', {
|
|
11
|
-
/**
|
|
12
|
-
* #slot
|
|
13
|
-
*/
|
|
14
7
|
color: {
|
|
15
8
|
type: 'color',
|
|
16
9
|
description: 'the color of each feature in a synteny, used with colorBy:default',
|
|
17
10
|
defaultValue: '#f0f',
|
|
18
11
|
contextVariable: ['feature'],
|
|
19
12
|
},
|
|
20
|
-
/**
|
|
21
|
-
* #slot
|
|
22
|
-
*/
|
|
23
13
|
posColor: {
|
|
24
14
|
type: 'color',
|
|
25
15
|
description: 'the color for forward alignments, used with colorBy:strand',
|
|
26
16
|
defaultValue: 'blue',
|
|
27
17
|
},
|
|
28
|
-
/**
|
|
29
|
-
* #slot
|
|
30
|
-
*/
|
|
31
18
|
negColor: {
|
|
32
19
|
type: 'color',
|
|
33
20
|
description: 'the color for reverse alignments, used with colorBy:strand',
|
|
34
21
|
defaultValue: 'red',
|
|
35
22
|
},
|
|
36
|
-
/**
|
|
37
|
-
* #slot
|
|
38
|
-
*/
|
|
39
23
|
lineWidth: {
|
|
40
24
|
type: 'number',
|
|
41
25
|
description: 'width of the lines to be drawn',
|
|
42
|
-
defaultValue: 2.5,
|
|
26
|
+
defaultValue: 2.5,
|
|
43
27
|
},
|
|
44
|
-
/**
|
|
45
|
-
* #slot
|
|
46
|
-
*/
|
|
47
28
|
colorBy: {
|
|
48
29
|
type: 'stringEnum',
|
|
49
30
|
model: mobx_state_tree_1.types.enumeration('colorBy', [
|
|
@@ -63,17 +44,11 @@ exports.default = (0, configuration_1.ConfigurationSchema)('DotplotRenderer', {
|
|
|
63
44
|
</ul>`,
|
|
64
45
|
defaultValue: 'default',
|
|
65
46
|
},
|
|
66
|
-
/**
|
|
67
|
-
* #slot
|
|
68
|
-
*/
|
|
69
47
|
thresholdsPalette: {
|
|
70
48
|
type: 'stringArray',
|
|
71
49
|
defaultValue: ['#094b09', '#2ebd40', '#d5670b', '#ffd84b'],
|
|
72
50
|
description: 'threshold colors, used with colorBy:identity',
|
|
73
51
|
},
|
|
74
|
-
/**
|
|
75
|
-
* #slot
|
|
76
|
-
*/
|
|
77
52
|
thresholds: {
|
|
78
53
|
type: 'stringArray',
|
|
79
54
|
defaultValue: ['0.75', '0.5', '0.25', '0'],
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import type { Dotplot1DViewModel } from '../DotplotView/model';
|
|
2
|
+
import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
|
|
3
|
+
import type { RenderArgsDeserialized } from '@jbrowse/core/pluggableElementTypes/renderers/ComparativeServerSideRendererType';
|
|
4
4
|
export interface DotplotRenderArgsDeserialized extends RenderArgsDeserialized {
|
|
5
5
|
adapterConfig: AnyConfigurationModel;
|
|
6
6
|
height: number;
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.drawDotplot = drawDotplot;
|
|
4
4
|
const configuration_1 = require("@jbrowse/core/configuration");
|
|
5
|
+
const ui_1 = require("@jbrowse/core/ui");
|
|
5
6
|
const Base1DUtils_1 = require("@jbrowse/core/util/Base1DUtils");
|
|
6
|
-
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
7
7
|
const plugin_alignments_1 = require("@jbrowse/plugin-alignments");
|
|
8
|
-
const
|
|
8
|
+
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
9
9
|
const { parseCigar } = plugin_alignments_1.MismatchParser;
|
|
10
10
|
const r = 'fell outside of range due to CIGAR string';
|
|
11
11
|
const lt = '(less than min coordinate of feature)';
|
|
12
12
|
const gt = '(greater than max coordinate of feature)';
|
|
13
|
-
const fudgeFactor = 1;
|
|
13
|
+
const fudgeFactor = 1;
|
|
14
14
|
function drawCir(ctx, x, y, r = 1) {
|
|
15
15
|
ctx.beginPath();
|
|
16
16
|
ctx.arc(x, y, r / 2, 0, 2 * Math.PI);
|
|
@@ -33,8 +33,6 @@ async function drawDotplot(ctx, props) {
|
|
|
33
33
|
const db2 = (_b = vview.dynamicBlocks.contentBlocks[0]) === null || _b === void 0 ? void 0 : _b.offsetPx;
|
|
34
34
|
const warnings = [];
|
|
35
35
|
ctx.lineWidth = lineWidth;
|
|
36
|
-
// we operate on snapshots of these attributes of the hview/vview because
|
|
37
|
-
// it is significantly faster than accessing the mobx objects
|
|
38
36
|
const { bpPerPx: hBpPerPx } = hview;
|
|
39
37
|
const { bpPerPx: vBpPerPx } = vview;
|
|
40
38
|
function clampWithWarnX(num, min, max, feature) {
|
|
@@ -177,7 +175,6 @@ async function drawDotplot(ctx, props) {
|
|
|
177
175
|
}
|
|
178
176
|
currX = clampWithWarnX(currX, b1, b2, feature);
|
|
179
177
|
currY = clampWithWarnY(currY, e1, e2, feature);
|
|
180
|
-
// only draw a line segment if it is bigger than 0.5px
|
|
181
178
|
if (Math.abs(currX - lastDrawnX) > 0.5 ||
|
|
182
179
|
Math.abs(currY - lastDrawnY) > 0.5) {
|
|
183
180
|
ctx.lineTo(currX, height - currY);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import PluginManager from '@jbrowse/core/PluginManager';
|
|
1
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
2
|
export default function DotplotRendererF(pluginManager: PluginManager): void;
|
|
@@ -4,8 +4,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.default = DotplotRendererF;
|
|
7
|
-
const DotplotRendering_1 = __importDefault(require("./components/DotplotRendering"));
|
|
8
7
|
const DotplotRenderer_1 = __importDefault(require("./DotplotRenderer"));
|
|
8
|
+
const DotplotRendering_1 = __importDefault(require("./components/DotplotRendering"));
|
|
9
9
|
const configSchema_1 = __importDefault(require("./configSchema"));
|
|
10
10
|
function DotplotRendererF(pluginManager) {
|
|
11
11
|
pluginManager.addRendererType(() => new DotplotRenderer_1.default({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Instance } from 'mobx-state-tree';
|
|
1
|
+
import type { Instance } from 'mobx-state-tree';
|
|
2
2
|
declare const Dotplot1DView: import("mobx-state-tree").IModelType<{
|
|
3
3
|
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
4
4
|
displayedRegions: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IType<import("@jbrowse/core/util").Region[], import("@jbrowse/core/util").Region[], import("@jbrowse/core/util").Region[]>, [undefined]>;
|
|
@@ -53,39 +53,14 @@ declare const Dotplot1DView: import("mobx-state-tree").IModelType<{
|
|
|
53
53
|
} & {
|
|
54
54
|
moveTo(start?: import("@jbrowse/core/util/Base1DUtils").BpOffset, end?: import("@jbrowse/core/util/Base1DUtils").BpOffset): void;
|
|
55
55
|
} & {
|
|
56
|
-
/**
|
|
57
|
-
* #action
|
|
58
|
-
*/
|
|
59
56
|
setScaleFactor(n: number): void;
|
|
60
|
-
/**
|
|
61
|
-
* #action
|
|
62
|
-
*/
|
|
63
57
|
center(): void;
|
|
64
58
|
} & {
|
|
65
|
-
/**
|
|
66
|
-
* #getter
|
|
67
|
-
* this uses padding=false and elision=false
|
|
68
|
-
*/
|
|
69
59
|
readonly dynamicBlocks: import("@jbrowse/core/util/blockTypes").BlockSet;
|
|
70
|
-
/**
|
|
71
|
-
* #getter
|
|
72
|
-
*/
|
|
73
60
|
readonly scaleFactor: number;
|
|
74
|
-
/**
|
|
75
|
-
* #getter
|
|
76
|
-
*/
|
|
77
61
|
readonly maxBpPerPx: number;
|
|
78
|
-
/**
|
|
79
|
-
* #getter
|
|
80
|
-
*/
|
|
81
62
|
readonly minBpPerPx: number;
|
|
82
|
-
/**
|
|
83
|
-
* #getter
|
|
84
|
-
*/
|
|
85
63
|
readonly maxOffset: number;
|
|
86
|
-
/**
|
|
87
|
-
* #getter
|
|
88
|
-
*/
|
|
89
64
|
readonly minOffset: number;
|
|
90
65
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
91
66
|
declare const DotplotHView: import("mobx-state-tree").IModelType<{
|
|
@@ -142,39 +117,14 @@ declare const DotplotHView: import("mobx-state-tree").IModelType<{
|
|
|
142
117
|
} & {
|
|
143
118
|
moveTo(start?: import("@jbrowse/core/util/Base1DUtils").BpOffset, end?: import("@jbrowse/core/util/Base1DUtils").BpOffset): void;
|
|
144
119
|
} & {
|
|
145
|
-
/**
|
|
146
|
-
* #action
|
|
147
|
-
*/
|
|
148
120
|
setScaleFactor(n: number): void;
|
|
149
|
-
/**
|
|
150
|
-
* #action
|
|
151
|
-
*/
|
|
152
121
|
center(): void;
|
|
153
122
|
} & {
|
|
154
|
-
/**
|
|
155
|
-
* #getter
|
|
156
|
-
* this uses padding=false and elision=false
|
|
157
|
-
*/
|
|
158
123
|
readonly dynamicBlocks: import("@jbrowse/core/util/blockTypes").BlockSet;
|
|
159
|
-
/**
|
|
160
|
-
* #getter
|
|
161
|
-
*/
|
|
162
124
|
readonly scaleFactor: number;
|
|
163
|
-
/**
|
|
164
|
-
* #getter
|
|
165
|
-
*/
|
|
166
125
|
readonly maxBpPerPx: number;
|
|
167
|
-
/**
|
|
168
|
-
* #getter
|
|
169
|
-
*/
|
|
170
126
|
readonly minBpPerPx: number;
|
|
171
|
-
/**
|
|
172
|
-
* #getter
|
|
173
|
-
*/
|
|
174
127
|
readonly maxOffset: number;
|
|
175
|
-
/**
|
|
176
|
-
* #getter
|
|
177
|
-
*/
|
|
178
128
|
readonly minOffset: number;
|
|
179
129
|
} & {
|
|
180
130
|
readonly width: any;
|
|
@@ -233,42 +183,17 @@ declare const DotplotVView: import("mobx-state-tree").IModelType<{
|
|
|
233
183
|
} & {
|
|
234
184
|
moveTo(start?: import("@jbrowse/core/util/Base1DUtils").BpOffset, end?: import("@jbrowse/core/util/Base1DUtils").BpOffset): void;
|
|
235
185
|
} & {
|
|
236
|
-
/**
|
|
237
|
-
* #action
|
|
238
|
-
*/
|
|
239
186
|
setScaleFactor(n: number): void;
|
|
240
|
-
/**
|
|
241
|
-
* #action
|
|
242
|
-
*/
|
|
243
187
|
center(): void;
|
|
244
188
|
} & {
|
|
245
|
-
/**
|
|
246
|
-
* #getter
|
|
247
|
-
* this uses padding=false and elision=false
|
|
248
|
-
*/
|
|
249
189
|
readonly dynamicBlocks: import("@jbrowse/core/util/blockTypes").BlockSet;
|
|
250
|
-
/**
|
|
251
|
-
* #getter
|
|
252
|
-
*/
|
|
253
190
|
readonly scaleFactor: number;
|
|
254
|
-
/**
|
|
255
|
-
* #getter
|
|
256
|
-
*/
|
|
257
191
|
readonly maxBpPerPx: number;
|
|
258
|
-
/**
|
|
259
|
-
* #getter
|
|
260
|
-
*/
|
|
261
192
|
readonly minBpPerPx: number;
|
|
262
|
-
/**
|
|
263
|
-
* #getter
|
|
264
|
-
*/
|
|
265
193
|
readonly maxOffset: number;
|
|
266
|
-
/**
|
|
267
|
-
* #getter
|
|
268
|
-
*/
|
|
269
194
|
readonly minOffset: number;
|
|
270
195
|
} & {
|
|
271
196
|
readonly width: any;
|
|
272
197
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
273
|
-
export {
|
|
198
|
+
export { Dotplot1DView, DotplotHView, DotplotVView };
|
|
274
199
|
export type Dotplot1DViewModel = Instance<typeof Dotplot1DView>;
|
|
@@ -3,68 +3,39 @@ 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
|
-
exports.
|
|
7
|
-
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
8
|
-
const mobx_1 = require("mobx");
|
|
6
|
+
exports.DotplotVView = exports.DotplotHView = exports.Dotplot1DView = void 0;
|
|
9
7
|
const Base1DViewModel_1 = __importDefault(require("@jbrowse/core/util/Base1DViewModel"));
|
|
10
8
|
const calculateDynamicBlocks_1 = __importDefault(require("@jbrowse/core/util/calculateDynamicBlocks"));
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
*/
|
|
15
|
-
function x() { } // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
9
|
+
const mobx_1 = require("mobx");
|
|
10
|
+
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
11
|
+
function x() { }
|
|
16
12
|
const Dotplot1DView = Base1DViewModel_1.default.extend(self => {
|
|
17
13
|
const scaleFactor = mobx_1.observable.box(1);
|
|
18
14
|
return {
|
|
19
15
|
views: {
|
|
20
|
-
/**
|
|
21
|
-
* #getter
|
|
22
|
-
* this uses padding=false and elision=false
|
|
23
|
-
*/
|
|
24
16
|
get dynamicBlocks() {
|
|
25
17
|
return (0, calculateDynamicBlocks_1.default)(self, false, false);
|
|
26
18
|
},
|
|
27
|
-
/**
|
|
28
|
-
* #getter
|
|
29
|
-
*/
|
|
30
19
|
get scaleFactor() {
|
|
31
20
|
return scaleFactor.get();
|
|
32
21
|
},
|
|
33
|
-
/**
|
|
34
|
-
* #getter
|
|
35
|
-
*/
|
|
36
22
|
get maxBpPerPx() {
|
|
37
23
|
return self.totalBp / (self.width - 50);
|
|
38
24
|
},
|
|
39
|
-
/**
|
|
40
|
-
* #getter
|
|
41
|
-
*/
|
|
42
25
|
get minBpPerPx() {
|
|
43
26
|
return 1 / 50;
|
|
44
27
|
},
|
|
45
|
-
/**
|
|
46
|
-
* #getter
|
|
47
|
-
*/
|
|
48
28
|
get maxOffset() {
|
|
49
29
|
return self.displayedRegionsTotalPx - self.width * 0.2;
|
|
50
30
|
},
|
|
51
|
-
/**
|
|
52
|
-
* #getter
|
|
53
|
-
*/
|
|
54
31
|
get minOffset() {
|
|
55
32
|
return -self.width * 0.8;
|
|
56
33
|
},
|
|
57
34
|
},
|
|
58
35
|
actions: {
|
|
59
|
-
/**
|
|
60
|
-
* #action
|
|
61
|
-
*/
|
|
62
36
|
setScaleFactor(n) {
|
|
63
37
|
scaleFactor.set(n);
|
|
64
38
|
},
|
|
65
|
-
/**
|
|
66
|
-
* #action
|
|
67
|
-
*/
|
|
68
39
|
center() {
|
|
69
40
|
const centerBp = self.totalBp / 2;
|
|
70
41
|
const centerPx = centerBp / self.bpPerPx;
|
|
@@ -5,13 +5,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.VerticalAxisRaw = exports.VerticalAxis = exports.HorizontalAxisRaw = exports.HorizontalAxis = void 0;
|
|
7
7
|
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const mui_1 = require("tss-react/mui");
|
|
9
|
-
const mobx_react_1 = require("mobx-react");
|
|
10
|
-
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
11
8
|
const util_1 = require("@jbrowse/core/util");
|
|
12
9
|
const Base1DUtils_1 = require("@jbrowse/core/util/Base1DUtils");
|
|
13
10
|
const material_1 = require("@mui/material");
|
|
14
|
-
|
|
11
|
+
const mobx_react_1 = require("mobx-react");
|
|
12
|
+
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
13
|
+
const mui_1 = require("tss-react/mui");
|
|
15
14
|
const util_2 = require("./util");
|
|
16
15
|
const useStyles = (0, mui_1.makeStyles)()(() => ({
|
|
17
16
|
vtext: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SvgIconProps } from '@mui/material/SvgIcon';
|
|
2
1
|
import React from 'react';
|
|
2
|
+
import type { SvgIconProps } from '@mui/material/SvgIcon';
|
|
3
3
|
export declare function CursorMove(props: SvgIconProps): React.JSX.Element;
|
|
4
4
|
export declare function CursorMouse(props: SvgIconProps): React.JSX.Element;
|
|
@@ -5,8 +5,8 @@ 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 SvgIcon_1 = __importDefault(require("@mui/material/SvgIcon"));
|
|
9
8
|
const react_1 = __importDefault(require("react"));
|
|
9
|
+
const SvgIcon_1 = __importDefault(require("@mui/material/SvgIcon"));
|
|
10
10
|
function CursorMove(props) {
|
|
11
11
|
return (react_1.default.createElement(SvgIcon_1.default, { ...props },
|
|
12
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" })));
|
|
@@ -4,15 +4,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const react_1 = __importDefault(require("react"));
|
|
7
|
-
const material_1 = require("@mui/material");
|
|
8
|
-
const mobx_react_1 = require("mobx-react");
|
|
9
7
|
const CascadingMenuButton_1 = __importDefault(require("@jbrowse/core/ui/CascadingMenuButton"));
|
|
10
|
-
|
|
11
|
-
const ZoomOut_1 = __importDefault(require("@mui/icons-material/ZoomOut"));
|
|
12
|
-
const ZoomIn_1 = __importDefault(require("@mui/icons-material/ZoomIn"));
|
|
8
|
+
const Icons_1 = require("@jbrowse/core/ui/Icons");
|
|
13
9
|
const MoreVert_1 = __importDefault(require("@mui/icons-material/MoreVert"));
|
|
10
|
+
const ZoomIn_1 = __importDefault(require("@mui/icons-material/ZoomIn"));
|
|
11
|
+
const ZoomOut_1 = __importDefault(require("@mui/icons-material/ZoomOut"));
|
|
12
|
+
const material_1 = require("@mui/material");
|
|
13
|
+
const mobx_react_1 = require("mobx-react");
|
|
14
14
|
const CursorIcon_1 = require("./CursorIcon");
|
|
15
|
-
const Icons_1 = require("@jbrowse/core/ui/Icons");
|
|
16
15
|
const DotplotControls = (0, mobx_react_1.observer)(function ({ model, }) {
|
|
17
16
|
return (react_1.default.createElement("div", null,
|
|
18
17
|
react_1.default.createElement(material_1.IconButton, { onClick: () => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { DotplotViewModel } from '../model';
|
|
2
|
+
import type { DotplotViewModel } from '../model';
|
|
3
3
|
type Coord = [number, number] | undefined;
|
|
4
4
|
export declare const DotplotTooltipClick: ({ model, mousedown, mousedownClient, xdistance, ydistance, }: {
|
|
5
5
|
model: DotplotViewModel;
|
|
@@ -5,8 +5,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.DotplotTooltipClick = void 0;
|
|
7
7
|
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const mobx_react_1 = require("mobx-react");
|
|
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;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { DotplotViewModel } from '../model';
|
|
2
|
+
import type { DotplotViewModel } from '../model';
|
|
3
3
|
type Coord = [number, number] | undefined;
|
|
4
4
|
declare const DotplotTooltipMouseover: ({ model, mouserect, mouserectClient, xdistance, }: {
|
|
5
5
|
model: DotplotViewModel;
|
|
@@ -4,8 +4,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const react_1 = __importDefault(require("react"));
|
|
7
|
-
const mobx_react_1 = require("mobx-react");
|
|
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;
|
|
@@ -28,13 +28,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
const react_1 = __importStar(require("react"));
|
|
30
30
|
const ui_1 = require("@jbrowse/core/ui");
|
|
31
|
-
const mobx_react_1 = require("mobx-react");
|
|
32
31
|
const mobx_1 = require("mobx");
|
|
32
|
+
const mobx_react_1 = require("mobx-react");
|
|
33
33
|
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
34
|
const Axes_1 = require("./Axes");
|
|
35
|
+
const Grid_1 = __importDefault(require("./Grid"));
|
|
36
|
+
const Header_1 = __importDefault(require("./Header"));
|
|
37
|
+
const ImportForm_1 = __importDefault(require("./ImportForm"));
|
|
38
38
|
const TooltipWhereClicked = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('./DotplotTooltipClick'))));
|
|
39
39
|
const TooltipWhereMouseovered = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('./DotplotTooltipMouseover'))));
|
|
40
40
|
const blank = { left: 0, top: 0, width: 0, height: 0 };
|
|
@@ -60,7 +60,7 @@ const useStyles = (0, mui_1.makeStyles)()(theme => ({
|
|
|
60
60
|
width: '100%',
|
|
61
61
|
gridRow: '1/2',
|
|
62
62
|
gridColumn: '2/2',
|
|
63
|
-
zIndex: 100,
|
|
63
|
+
zIndex: 100,
|
|
64
64
|
'& path': {
|
|
65
65
|
cursor: 'crosshair',
|
|
66
66
|
fill: 'none',
|
|
@@ -78,8 +78,6 @@ const useStyles = (0, mui_1.makeStyles)()(theme => ({
|
|
|
78
78
|
borderTop: '1px solid #fafafa',
|
|
79
79
|
},
|
|
80
80
|
}));
|
|
81
|
-
// produces offsetX/offsetY coordinates from a clientX and an element's
|
|
82
|
-
// getBoundingClientRect
|
|
83
81
|
function getOffset(coord, rect) {
|
|
84
82
|
return coord && [coord[0] - rect.left, coord[1] - rect.top];
|
|
85
83
|
}
|
|
@@ -119,7 +117,6 @@ const DotplotViewInternal = (0, mobx_react_1.observer)(function ({ model, }) {
|
|
|
119
117
|
(cursorMode === 'crosshair' && ctrlKeyWasUsed);
|
|
120
118
|
const validSelect = (cursorMode === 'move' && ctrlKeyWasUsed) ||
|
|
121
119
|
(cursorMode === 'crosshair' && !ctrlKeyWasUsed);
|
|
122
|
-
// use non-React wheel handler to properly prevent body scrolling
|
|
123
120
|
(0, react_1.useEffect)(() => {
|
|
124
121
|
function onWheel(event) {
|
|
125
122
|
event.preventDefault();
|
|
@@ -188,8 +185,6 @@ const DotplotViewInternal = (0, mobx_react_1.observer)(function ({ model, }) {
|
|
|
188
185
|
window.addEventListener('keyup', globalCtrlKeyUp);
|
|
189
186
|
};
|
|
190
187
|
}, []);
|
|
191
|
-
// detect a mouseup after a mousedown was submitted, autoremoves mouseup once
|
|
192
|
-
// that single mouseup is set
|
|
193
188
|
(0, react_1.useEffect)(() => {
|
|
194
189
|
function globalMouseUp(event) {
|
|
195
190
|
if (Math.abs(xdistance) > 3 && Math.abs(ydistance) > 3 && validSelect) {
|
|
@@ -257,7 +252,6 @@ const DotplotViewInternal = (0, mobx_react_1.observer)(function ({ model, }) {
|
|
|
257
252
|
if (mousedown && mouseup) {
|
|
258
253
|
model.zoomInToMouseCoords(mousedown, mouseup);
|
|
259
254
|
}
|
|
260
|
-
// below line is needed to prevent tooltip from sticking
|
|
261
255
|
setMouseOvered(false);
|
|
262
256
|
},
|
|
263
257
|
},
|
|
@@ -267,7 +261,6 @@ const DotplotViewInternal = (0, mobx_react_1.observer)(function ({ model, }) {
|
|
|
267
261
|
if (mousedown && mouseup) {
|
|
268
262
|
model.onDotplotView(mousedown, mouseup);
|
|
269
263
|
}
|
|
270
|
-
// below line is needed to prevent tooltip from sticking
|
|
271
264
|
setMouseOvered(false);
|
|
272
265
|
},
|
|
273
266
|
},
|
|
@@ -26,7 +26,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
26
26
|
const react_1 = __importStar(require("react"));
|
|
27
27
|
const material_1 = require("@mui/material");
|
|
28
28
|
const mobx_react_1 = require("mobx-react");
|
|
29
|
-
// lazy components
|
|
30
29
|
const WarningDialog = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('./WarningDialog'))));
|
|
31
30
|
const DotplotWarnings = (0, mobx_react_1.observer)(function ({ model, }) {
|
|
32
31
|
const trackWarnings = model.tracks.filter(t => { var _a; return (_a = t.displays[0].warnings) === null || _a === void 0 ? void 0 : _a.length; });
|
|
@@ -25,9 +25,9 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.default = ExportSvgDialog;
|
|
27
27
|
const react_1 = __importStar(require("react"));
|
|
28
|
-
const material_1 = require("@mui/material");
|
|
29
28
|
const ui_1 = require("@jbrowse/core/ui");
|
|
30
29
|
const util_1 = require("@jbrowse/core/util");
|
|
30
|
+
const material_1 = require("@mui/material");
|
|
31
31
|
function LoadingMessage() {
|
|
32
32
|
return (react_1.default.createElement("div", null,
|
|
33
33
|
react_1.default.createElement(material_1.CircularProgress, { size: 20, style: { marginRight: 20 } }),
|
|
@@ -56,9 +56,7 @@ function ExportSvgDialog({ model, handleClose, }) {
|
|
|
56
56
|
} }),
|
|
57
57
|
session.allThemes ? (react_1.default.createElement(TextField2, { select: true, label: "Theme", value: themeName, onChange: event => {
|
|
58
58
|
setThemeName(event.target.value);
|
|
59
|
-
} }, Object.entries(session.allThemes()).map(([key, val]) => (react_1.default.createElement(material_1.MenuItem, { key: key, value: key },
|
|
60
|
-
// @ts-expect-error
|
|
61
|
-
val.name || '(Unknown name)'))))) : null,
|
|
59
|
+
} }, Object.entries(session.allThemes()).map(([key, val]) => (react_1.default.createElement(material_1.MenuItem, { key: key, value: key }, val.name || '(Unknown name)'))))) : null,
|
|
62
60
|
offscreenCanvas ? (react_1.default.createElement(material_1.FormControlLabel, { control: react_1.default.createElement(material_1.Checkbox, { checked: rasterizeLayers, onChange: () => {
|
|
63
61
|
setRasterizeLayers(val => !val);
|
|
64
62
|
} }), label: "Rasterize canvas based tracks? File may be much larger if this is turned off" })) : (react_1.default.createElement(material_1.Typography, null, "Note: rasterizing layers not yet supported in this browser, so SVG size may be large"))),
|