@jbrowse/plugin-linear-comparative-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/LGVSyntenyDisplay/components/LaunchSyntenyViewDialog.d.ts +6 -5
- package/dist/LGVSyntenyDisplay/components/LaunchSyntenyViewDialog.js +36 -60
- package/dist/LGVSyntenyDisplay/components/util.d.ts +9 -6
- package/dist/LGVSyntenyDisplay/components/util.js +6 -13
- package/dist/LGVSyntenyDisplay/configSchemaF.d.ts +19 -10
- package/dist/LGVSyntenyDisplay/configSchemaF.js +12 -9
- package/dist/LGVSyntenyDisplay/index.d.ts +1 -1
- package/dist/LGVSyntenyDisplay/index.js +1 -1
- package/dist/LGVSyntenyDisplay/model.d.ts +122 -69
- package/dist/LGVSyntenyDisplay/model.js +20 -37
- package/dist/LaunchLinearSyntenyView.d.ts +1 -1
- package/dist/LaunchLinearSyntenyView.js +1 -3
- package/dist/LinearComparativeDisplay/configSchemaF.d.ts +0 -3
- package/dist/LinearComparativeDisplay/configSchemaF.js +0 -6
- package/dist/LinearComparativeDisplay/index.d.ts +1 -1
- package/dist/LinearComparativeDisplay/stateModelFactory.d.ts +12 -69
- package/dist/LinearComparativeDisplay/stateModelFactory.js +13 -57
- package/dist/LinearComparativeView/components/Header.d.ts +2 -3
- package/dist/LinearComparativeView/components/Header.js +56 -86
- package/dist/LinearComparativeView/components/HeaderSearchBoxes.d.ts +2 -3
- package/dist/LinearComparativeView/components/HeaderSearchBoxes.js +5 -15
- package/dist/LinearComparativeView/components/LinearComparativeRenderArea.d.ts +2 -3
- package/dist/LinearComparativeView/components/LinearComparativeRenderArea.js +17 -32
- package/dist/LinearComparativeView/components/LinearComparativeView.d.ts +2 -3
- package/dist/LinearComparativeView/components/LinearComparativeView.js +4 -9
- package/dist/LinearComparativeView/components/Rubberband.d.ts +2 -3
- package/dist/LinearComparativeView/components/Rubberband.js +36 -69
- package/dist/LinearComparativeView/components/VerticalGuide.d.ts +2 -3
- package/dist/LinearComparativeView/components/VerticalGuide.js +5 -9
- package/dist/LinearComparativeView/index.d.ts +1 -1
- package/dist/LinearComparativeView/index.js +17 -7
- package/dist/LinearComparativeView/model.d.ts +38 -90
- package/dist/LinearComparativeView/model.js +40 -107
- package/dist/LinearReadVsRef/LinearReadVsRef.d.ts +2 -3
- package/dist/LinearReadVsRef/LinearReadVsRef.js +10 -55
- package/dist/LinearReadVsRef/index.d.ts +1 -1
- package/dist/LinearReadVsRef/index.js +17 -9
- package/dist/LinearSyntenyDisplay/afterAttach.d.ts +1 -1
- package/dist/LinearSyntenyDisplay/afterAttach.js +8 -12
- package/dist/LinearSyntenyDisplay/components/Component.d.ts +2 -3
- package/dist/LinearSyntenyDisplay/components/Component.js +11 -36
- package/dist/LinearSyntenyDisplay/components/LinearSyntenyRendering.d.ts +2 -3
- package/dist/LinearSyntenyDisplay/components/LinearSyntenyRendering.js +95 -106
- package/dist/LinearSyntenyDisplay/components/SyntenyContextMenu.d.ts +3 -4
- package/dist/LinearSyntenyDisplay/components/SyntenyContextMenu.js +3 -6
- package/dist/LinearSyntenyDisplay/components/SyntenyTooltip.d.ts +1 -2
- package/dist/LinearSyntenyDisplay/components/SyntenyTooltip.js +3 -4
- package/dist/LinearSyntenyDisplay/components/util.d.ts +3 -3
- package/dist/LinearSyntenyDisplay/components/util.js +0 -9
- package/dist/LinearSyntenyDisplay/configSchemaF.d.ts +1 -12
- package/dist/LinearSyntenyDisplay/configSchemaF.js +0 -15
- package/dist/LinearSyntenyDisplay/drawSynteny.d.ts +1 -1
- package/dist/LinearSyntenyDisplay/drawSynteny.js +1 -23
- package/dist/LinearSyntenyDisplay/index.d.ts +1 -1
- package/dist/LinearSyntenyDisplay/index.js +18 -9
- package/dist/LinearSyntenyDisplay/model.d.ts +8 -102
- package/dist/LinearSyntenyDisplay/model.js +18 -99
- package/dist/LinearSyntenyView/components/ExportSvgDialog.d.ts +2 -3
- package/dist/LinearSyntenyView/components/ExportSvgDialog.js +35 -76
- package/dist/LinearSyntenyView/components/Icons.d.ts +3 -4
- package/dist/LinearSyntenyView/components/Icons.js +3 -8
- package/dist/LinearSyntenyView/components/ImportForm/ImportSyntenyOpenCustomTrack.d.ts +8 -0
- package/dist/LinearSyntenyView/components/ImportForm/ImportSyntenyOpenCustomTrack.js +130 -0
- package/dist/LinearSyntenyView/components/ImportForm/ImportSyntenyPreConfigured.d.ts +8 -0
- package/dist/LinearSyntenyView/components/ImportForm/ImportSyntenyPreConfigured.js +39 -0
- package/dist/LinearSyntenyView/components/ImportForm/ImportSyntenyTrackSelectorArea.d.ts +7 -0
- package/dist/LinearSyntenyView/components/ImportForm/ImportSyntenyTrackSelectorArea.js +22 -0
- package/dist/LinearSyntenyView/components/ImportForm/LinearSyntenyImportForm.d.ts +2 -3
- package/dist/LinearSyntenyView/components/ImportForm/LinearSyntenyImportForm.js +49 -150
- package/dist/LinearSyntenyView/components/ImportForm/doSubmit.d.ts +5 -0
- package/dist/LinearSyntenyView/components/ImportForm/doSubmit.js +43 -0
- package/dist/LinearSyntenyView/components/ImportForm/getAdapter.d.ts +117 -0
- package/dist/LinearSyntenyView/components/ImportForm/getAdapter.js +68 -0
- package/dist/LinearSyntenyView/components/ImportForm/util.js +1 -3
- package/dist/LinearSyntenyView/components/LinearSyntenyView.d.ts +2 -3
- package/dist/LinearSyntenyView/components/LinearSyntenyView.js +20 -10
- package/dist/LinearSyntenyView/index.d.ts +1 -1
- package/dist/LinearSyntenyView/index.js +17 -7
- package/dist/LinearSyntenyView/model.d.ts +54 -58
- package/dist/LinearSyntenyView/model.js +61 -56
- package/dist/LinearSyntenyView/svgcomponents/SVGBackground.d.ts +1 -2
- package/dist/LinearSyntenyView/svgcomponents/SVGBackground.js +3 -6
- package/dist/LinearSyntenyView/svgcomponents/SVGLinearGenomeView.d.ts +2 -3
- package/dist/LinearSyntenyView/svgcomponents/SVGLinearGenomeView.js +3 -11
- package/dist/LinearSyntenyView/svgcomponents/SVGLinearSyntenyView.d.ts +1 -1
- package/dist/LinearSyntenyView/svgcomponents/SVGLinearSyntenyView.js +7 -24
- package/dist/LinearSyntenyView/types.d.ts +12 -0
- package/dist/LinearSyntenyView/types.js +2 -0
- package/dist/LinearSyntenyViewHelper/index.d.ts +1 -1
- package/dist/LinearSyntenyViewHelper/index.js +2 -2
- package/dist/LinearSyntenyViewHelper/stateModelFactory.d.ts +2 -14
- package/dist/LinearSyntenyViewHelper/stateModelFactory.js +2 -29
- package/dist/SyntenyFeatureDetail/LinkToSyntenyView.d.ts +5 -0
- package/dist/SyntenyFeatureDetail/LinkToSyntenyView.js +87 -0
- package/dist/SyntenyFeatureDetail/SyntenyFeatureDetail.d.ts +2 -11
- package/dist/SyntenyFeatureDetail/SyntenyFeatureDetail.js +5 -90
- package/dist/SyntenyFeatureDetail/index.d.ts +1 -1
- package/dist/SyntenyFeatureDetail/index.js +18 -14
- package/dist/SyntenyFeatureDetail/types.d.ts +9 -0
- package/dist/SyntenyFeatureDetail/types.js +2 -0
- package/dist/SyntenyTrack/configSchema.d.ts +1 -1
- package/dist/SyntenyTrack/configSchema.js +1 -9
- package/dist/SyntenyTrack/index.d.ts +1 -1
- package/dist/SyntenyTrack/index.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -4
- package/dist/util.d.ts +2 -2
- package/dist/util.js +1 -11
- package/esm/LGVSyntenyDisplay/components/LaunchSyntenyViewDialog.d.ts +6 -5
- package/esm/LGVSyntenyDisplay/components/LaunchSyntenyViewDialog.js +35 -36
- package/esm/LGVSyntenyDisplay/components/util.d.ts +9 -6
- package/esm/LGVSyntenyDisplay/components/util.js +6 -13
- package/esm/LGVSyntenyDisplay/configSchemaF.d.ts +19 -10
- package/esm/LGVSyntenyDisplay/configSchemaF.js +12 -9
- package/esm/LGVSyntenyDisplay/index.d.ts +1 -1
- package/esm/LGVSyntenyDisplay/index.js +1 -1
- package/esm/LGVSyntenyDisplay/model.d.ts +122 -69
- package/esm/LGVSyntenyDisplay/model.js +4 -31
- package/esm/LaunchLinearSyntenyView.d.ts +1 -1
- package/esm/LaunchLinearSyntenyView.js +1 -3
- package/esm/LinearComparativeDisplay/configSchemaF.d.ts +0 -3
- package/esm/LinearComparativeDisplay/configSchemaF.js +0 -6
- package/esm/LinearComparativeDisplay/index.d.ts +1 -1
- package/esm/LinearComparativeDisplay/stateModelFactory.d.ts +12 -69
- package/esm/LinearComparativeDisplay/stateModelFactory.js +14 -58
- package/esm/LinearComparativeView/components/Header.d.ts +2 -3
- package/esm/LinearComparativeView/components/Header.js +56 -63
- package/esm/LinearComparativeView/components/HeaderSearchBoxes.d.ts +2 -3
- package/esm/LinearComparativeView/components/HeaderSearchBoxes.js +5 -12
- package/esm/LinearComparativeView/components/LinearComparativeRenderArea.d.ts +2 -3
- package/esm/LinearComparativeView/components/LinearComparativeRenderArea.js +17 -29
- package/esm/LinearComparativeView/components/LinearComparativeView.d.ts +2 -3
- package/esm/LinearComparativeView/components/LinearComparativeView.js +4 -9
- package/esm/LinearComparativeView/components/Rubberband.d.ts +2 -3
- package/esm/LinearComparativeView/components/Rubberband.js +36 -46
- package/esm/LinearComparativeView/components/VerticalGuide.d.ts +2 -3
- package/esm/LinearComparativeView/components/VerticalGuide.js +5 -6
- package/esm/LinearComparativeView/index.d.ts +1 -1
- package/esm/LinearComparativeView/model.d.ts +38 -90
- package/esm/LinearComparativeView/model.js +24 -101
- package/esm/LinearReadVsRef/LinearReadVsRef.d.ts +2 -3
- package/esm/LinearReadVsRef/LinearReadVsRef.js +10 -32
- package/esm/LinearReadVsRef/index.d.ts +1 -1
- package/esm/LinearReadVsRef/index.js +1 -3
- package/esm/LinearSyntenyDisplay/afterAttach.d.ts +1 -1
- package/esm/LinearSyntenyDisplay/afterAttach.js +8 -12
- package/esm/LinearSyntenyDisplay/components/Component.d.ts +2 -3
- package/esm/LinearSyntenyDisplay/components/Component.js +11 -13
- package/esm/LinearSyntenyDisplay/components/LinearSyntenyRendering.d.ts +2 -3
- package/esm/LinearSyntenyDisplay/components/LinearSyntenyRendering.js +79 -100
- package/esm/LinearSyntenyDisplay/components/SyntenyContextMenu.d.ts +3 -4
- package/esm/LinearSyntenyDisplay/components/SyntenyContextMenu.js +3 -3
- package/esm/LinearSyntenyDisplay/components/SyntenyTooltip.d.ts +1 -2
- package/esm/LinearSyntenyDisplay/components/SyntenyTooltip.js +3 -4
- package/esm/LinearSyntenyDisplay/components/util.d.ts +3 -3
- package/esm/LinearSyntenyDisplay/components/util.js +2 -11
- package/esm/LinearSyntenyDisplay/configSchemaF.d.ts +1 -12
- package/esm/LinearSyntenyDisplay/configSchemaF.js +0 -15
- package/esm/LinearSyntenyDisplay/drawSynteny.d.ts +1 -1
- package/esm/LinearSyntenyDisplay/drawSynteny.js +1 -23
- package/esm/LinearSyntenyDisplay/index.d.ts +1 -1
- package/esm/LinearSyntenyDisplay/index.js +1 -2
- package/esm/LinearSyntenyDisplay/model.d.ts +8 -102
- package/esm/LinearSyntenyDisplay/model.js +1 -92
- package/esm/LinearSyntenyView/components/ExportSvgDialog.d.ts +2 -3
- package/esm/LinearSyntenyView/components/ExportSvgDialog.js +35 -53
- package/esm/LinearSyntenyView/components/Icons.d.ts +3 -4
- package/esm/LinearSyntenyView/components/Icons.js +3 -5
- package/esm/LinearSyntenyView/components/ImportForm/ImportSyntenyOpenCustomTrack.d.ts +8 -0
- package/esm/LinearSyntenyView/components/ImportForm/ImportSyntenyOpenCustomTrack.js +125 -0
- package/esm/LinearSyntenyView/components/ImportForm/ImportSyntenyPreConfigured.d.ts +8 -0
- package/esm/LinearSyntenyView/components/ImportForm/ImportSyntenyPreConfigured.js +37 -0
- package/esm/LinearSyntenyView/components/ImportForm/ImportSyntenyTrackSelectorArea.d.ts +7 -0
- package/esm/LinearSyntenyView/components/ImportForm/ImportSyntenyTrackSelectorArea.js +16 -0
- package/esm/LinearSyntenyView/components/ImportForm/LinearSyntenyImportForm.d.ts +2 -3
- package/esm/LinearSyntenyView/components/ImportForm/LinearSyntenyImportForm.js +49 -127
- package/esm/LinearSyntenyView/components/ImportForm/doSubmit.d.ts +5 -0
- package/esm/LinearSyntenyView/components/ImportForm/doSubmit.js +40 -0
- package/esm/LinearSyntenyView/components/ImportForm/getAdapter.d.ts +117 -0
- package/esm/LinearSyntenyView/components/ImportForm/getAdapter.js +65 -0
- package/esm/LinearSyntenyView/components/ImportForm/util.js +1 -3
- package/esm/LinearSyntenyView/components/LinearSyntenyView.d.ts +2 -3
- package/esm/LinearSyntenyView/components/LinearSyntenyView.js +3 -3
- package/esm/LinearSyntenyView/index.d.ts +1 -1
- package/esm/LinearSyntenyView/model.d.ts +54 -58
- package/esm/LinearSyntenyView/model.js +44 -49
- package/esm/LinearSyntenyView/svgcomponents/SVGBackground.d.ts +1 -2
- package/esm/LinearSyntenyView/svgcomponents/SVGBackground.js +3 -3
- package/esm/LinearSyntenyView/svgcomponents/SVGLinearGenomeView.d.ts +2 -3
- package/esm/LinearSyntenyView/svgcomponents/SVGLinearGenomeView.js +4 -9
- package/esm/LinearSyntenyView/svgcomponents/SVGLinearSyntenyView.d.ts +1 -1
- package/esm/LinearSyntenyView/svgcomponents/SVGLinearSyntenyView.js +8 -25
- package/esm/LinearSyntenyView/types.d.ts +12 -0
- package/esm/LinearSyntenyView/types.js +1 -0
- package/esm/LinearSyntenyViewHelper/index.d.ts +1 -1
- package/esm/LinearSyntenyViewHelper/index.js +2 -2
- package/esm/LinearSyntenyViewHelper/stateModelFactory.d.ts +2 -14
- package/esm/LinearSyntenyViewHelper/stateModelFactory.js +2 -29
- package/esm/SyntenyFeatureDetail/LinkToSyntenyView.d.ts +5 -0
- package/esm/SyntenyFeatureDetail/LinkToSyntenyView.js +52 -0
- package/esm/SyntenyFeatureDetail/SyntenyFeatureDetail.d.ts +2 -11
- package/esm/SyntenyFeatureDetail/SyntenyFeatureDetail.js +6 -68
- package/esm/SyntenyFeatureDetail/index.d.ts +1 -1
- package/esm/SyntenyFeatureDetail/index.js +1 -7
- package/esm/SyntenyFeatureDetail/types.d.ts +9 -0
- package/esm/SyntenyFeatureDetail/types.js +1 -0
- package/esm/SyntenyTrack/configSchema.d.ts +1 -1
- package/esm/SyntenyTrack/configSchema.js +1 -9
- package/esm/SyntenyTrack/index.d.ts +1 -1
- package/esm/SyntenyTrack/index.js +1 -1
- package/esm/index.d.ts +1 -1
- package/esm/index.js +4 -4
- package/esm/util.d.ts +2 -2
- package/esm/util.js +1 -11
- package/package.json +2 -4
- package/dist/LinearSyntenyView/components/ImportForm/AddCustomTrack.d.ts +0 -10
- package/dist/LinearSyntenyView/components/ImportForm/AddCustomTrack.js +0 -194
- package/dist/LinearSyntenyView/components/ImportForm/Spacer.d.ts +0 -2
- package/dist/LinearSyntenyView/components/ImportForm/Spacer.js +0 -10
- package/dist/LinearSyntenyView/components/ImportForm/TrackSelector.d.ts +0 -10
- package/dist/LinearSyntenyView/components/ImportForm/TrackSelector.js +0 -59
- package/dist/LinearSyntenyView/components/ImportForm/TrackSelectorUtil.d.ts +0 -14
- package/dist/LinearSyntenyView/components/ImportForm/TrackSelectorUtil.js +0 -52
- package/esm/LinearSyntenyView/components/ImportForm/AddCustomTrack.d.ts +0 -10
- package/esm/LinearSyntenyView/components/ImportForm/AddCustomTrack.js +0 -169
- package/esm/LinearSyntenyView/components/ImportForm/Spacer.d.ts +0 -2
- package/esm/LinearSyntenyView/components/ImportForm/Spacer.js +0 -4
- package/esm/LinearSyntenyView/components/ImportForm/TrackSelector.d.ts +0 -10
- package/esm/LinearSyntenyView/components/ImportForm/TrackSelector.js +0 -34
- package/esm/LinearSyntenyView/components/ImportForm/TrackSelectorUtil.d.ts +0 -14
- package/esm/LinearSyntenyView/components/ImportForm/TrackSelectorUtil.js +0 -23
|
@@ -3,12 +3,11 @@ 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 ui_1 = require("@jbrowse/core/ui");
|
|
9
8
|
const BaseTooltip_1 = __importDefault(require("@jbrowse/core/ui/BaseTooltip"));
|
|
9
|
+
const mobx_react_1 = require("mobx-react");
|
|
10
10
|
const SyntenyTooltip = (0, mobx_react_1.observer)(function ({ title }) {
|
|
11
|
-
return title ? (
|
|
12
|
-
react_1.default.createElement(ui_1.SanitizedHTML, { html: title }))) : null;
|
|
11
|
+
return title ? ((0, jsx_runtime_1.jsx)(BaseTooltip_1.default, { children: (0, jsx_runtime_1.jsx)(ui_1.SanitizedHTML, { html: title }) })) : null;
|
|
13
12
|
});
|
|
14
13
|
exports.default = SyntenyTooltip;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { LinearSyntenyDisplayModel } from '../model';
|
|
3
|
+
import type { Feature } from '@jbrowse/core/util';
|
|
4
4
|
interface Pos {
|
|
5
5
|
offsetPx: number;
|
|
6
6
|
}
|
|
@@ -8,7 +8,6 @@ exports.onSynClick = onSynClick;
|
|
|
8
8
|
exports.onSynContextClick = onSynContextClick;
|
|
9
9
|
exports.getTooltip = getTooltip;
|
|
10
10
|
const util_1 = require("@jbrowse/core/util");
|
|
11
|
-
// locals
|
|
12
11
|
const drawSynteny_1 = require("../drawSynteny");
|
|
13
12
|
function drawMatchSimple({ feature, ctx, offsets, level, cb, height, drawCurves, oobLimit, viewWidth, hideTiny, }) {
|
|
14
13
|
const { p11, p12, p21, p22 } = feature;
|
|
@@ -26,11 +25,7 @@ function drawMatchSimple({ feature, ctx, offsets, level, cb, height, drawCurves,
|
|
|
26
25
|
if (!(0, util_1.doesIntersect2)(minX, maxX, -oobLimit, viewWidth + oobLimit)) {
|
|
27
26
|
return;
|
|
28
27
|
}
|
|
29
|
-
// drawing a line if the results are thin: drawing a line results in much
|
|
30
|
-
// less pixellation than filling in a thin polygon
|
|
31
28
|
if (l1 <= 1 && l2 <= 1) {
|
|
32
|
-
// hideTiny can be used to avoid drawing mouseover for thin lines in this
|
|
33
|
-
// case
|
|
34
29
|
if (!hideTiny) {
|
|
35
30
|
ctx.beginPath();
|
|
36
31
|
ctx.moveTo(x11, y1);
|
|
@@ -67,9 +62,6 @@ function drawBox(ctx, x1, x2, y1, x3, x4, y2) {
|
|
|
67
62
|
function drawBezierBox(ctx, x1, x2, y1, x3, x4, y2, mid) {
|
|
68
63
|
const len1 = Math.abs(x1 - x2);
|
|
69
64
|
const len2 = Math.abs(x1 - x2);
|
|
70
|
-
// heuristic to not draw hourglass inversions with bezier curves when they
|
|
71
|
-
// are thin and far apart because it results in areas that are not drawn well
|
|
72
|
-
// demo https://codesandbox.io/s/fast-glitter-q3b1or?file=/src/index.js
|
|
73
65
|
if (len1 < 5 && len2 < 5 && x2 < x1 && Math.abs(x1 - x3) > 100) {
|
|
74
66
|
const tmp = x1;
|
|
75
67
|
x1 = x2;
|
|
@@ -143,7 +135,6 @@ function onSynContextClick(event, model, setAnchorEl) {
|
|
|
143
135
|
}
|
|
144
136
|
}
|
|
145
137
|
function getTooltip({ feature, cigarOp, cigarOpLen, }) {
|
|
146
|
-
// @ts-expect-error
|
|
147
138
|
const f1 = feature.toJSON();
|
|
148
139
|
const f2 = f1.mate;
|
|
149
140
|
const l1 = f1.end - f1.start;
|
|
@@ -1,20 +1,9 @@
|
|
|
1
|
-
import PluginManager from '@jbrowse/core/PluginManager';
|
|
2
|
-
/**
|
|
3
|
-
* #config LinearSyntenyDisplay
|
|
4
|
-
*/
|
|
1
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
5
2
|
declare function configSchemaFactory(pluginManager: PluginManager): import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
6
|
-
/**
|
|
7
|
-
* #slot
|
|
8
|
-
* currently unused
|
|
9
|
-
*/
|
|
10
3
|
trackIds: {
|
|
11
4
|
type: string;
|
|
12
5
|
defaultValue: never[];
|
|
13
6
|
};
|
|
14
|
-
/**
|
|
15
|
-
* #slot
|
|
16
|
-
* currently unused
|
|
17
|
-
*/
|
|
18
7
|
middle: {
|
|
19
8
|
type: string;
|
|
20
9
|
defaultValue: boolean;
|
|
@@ -5,29 +5,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const configuration_1 = require("@jbrowse/core/configuration");
|
|
7
7
|
const configSchemaF_1 = __importDefault(require("../LinearComparativeDisplay/configSchemaF"));
|
|
8
|
-
/**
|
|
9
|
-
* #config LinearSyntenyDisplay
|
|
10
|
-
*/
|
|
11
8
|
function configSchemaFactory(pluginManager) {
|
|
12
9
|
return (0, configuration_1.ConfigurationSchema)('LinearSyntenyDisplay', {
|
|
13
|
-
/**
|
|
14
|
-
* #slot
|
|
15
|
-
* currently unused
|
|
16
|
-
*/
|
|
17
10
|
trackIds: {
|
|
18
11
|
type: 'stringArray',
|
|
19
12
|
defaultValue: [],
|
|
20
13
|
},
|
|
21
|
-
/**
|
|
22
|
-
* #slot
|
|
23
|
-
* currently unused
|
|
24
|
-
*/
|
|
25
14
|
middle: { type: 'boolean', defaultValue: true },
|
|
26
15
|
}, {
|
|
27
|
-
/**
|
|
28
|
-
* #baseConfiguration
|
|
29
|
-
* this refers to the LinearComparativeDisplay
|
|
30
|
-
*/
|
|
31
16
|
baseConfiguration: (0, configSchemaF_1.default)(pluginManager),
|
|
32
17
|
explicitlyTyped: true,
|
|
33
18
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LinearSyntenyDisplayModel } from './model';
|
|
1
|
+
import type { LinearSyntenyDisplayModel } from './model';
|
|
2
2
|
export declare const MAX_COLOR_RANGE: number;
|
|
3
3
|
export declare function getId(r: number, g: number, b: number, unitMultiplier: number): number;
|
|
4
4
|
export declare function drawRef(model: LinearSyntenyDisplayModel, ctx1: CanvasRenderingContext2D, ctx3?: CanvasRenderingContext2D): void;
|
|
@@ -6,7 +6,7 @@ exports.drawRef = drawRef;
|
|
|
6
6
|
exports.drawMouseoverSynteny = drawMouseoverSynteny;
|
|
7
7
|
const util_1 = require("@jbrowse/core/util");
|
|
8
8
|
const util_2 = require("./components/util");
|
|
9
|
-
exports.MAX_COLOR_RANGE = 255 * 255 * 255;
|
|
9
|
+
exports.MAX_COLOR_RANGE = 255 * 255 * 255;
|
|
10
10
|
function makeColor(idx) {
|
|
11
11
|
const r = Math.floor(idx / (255 * 255)) % 255;
|
|
12
12
|
const g = Math.floor(idx / 255) % 255;
|
|
@@ -40,8 +40,6 @@ function drawRef(model, ctx1, ctx3) {
|
|
|
40
40
|
ctx1.beginPath();
|
|
41
41
|
const offsets = view.views.map(v => v.offsetPx);
|
|
42
42
|
const unitMultiplier = Math.floor(exports.MAX_COLOR_RANGE / featPositions.length);
|
|
43
|
-
// this loop is optimized to draw many thin lines with a single ctx.stroke
|
|
44
|
-
// call, a separate loop below draws larger boxes
|
|
45
43
|
ctx1.fillStyle = colorMap.M;
|
|
46
44
|
ctx1.strokeStyle = colorMap.M;
|
|
47
45
|
for (const { p11, p12, p21, p22 } of featPositions) {
|
|
@@ -54,8 +52,6 @@ function drawRef(model, ctx1, ctx3) {
|
|
|
54
52
|
const y1 = 0;
|
|
55
53
|
const y2 = height;
|
|
56
54
|
const mid = (y2 - y1) / 2;
|
|
57
|
-
// drawing a line if the results are thin results in much less pixellation
|
|
58
|
-
// than filling in a thin polygon
|
|
59
55
|
if (l1 <= lineLimit &&
|
|
60
56
|
l2 <= lineLimit &&
|
|
61
57
|
x21 < width + oobLimit &&
|
|
@@ -70,8 +66,6 @@ function drawRef(model, ctx1, ctx3) {
|
|
|
70
66
|
}
|
|
71
67
|
}
|
|
72
68
|
ctx1.stroke();
|
|
73
|
-
// this loop only draws small lines as a polyline, the polyline calls
|
|
74
|
-
// ctx.stroke once is much more efficient than calling stroke() many times
|
|
75
69
|
ctx1.fillStyle = colorMap.M;
|
|
76
70
|
ctx1.strokeStyle = colorMap.M;
|
|
77
71
|
for (const { p11, p12, p21, p22, f, cigar } of featPositions) {
|
|
@@ -91,17 +85,12 @@ function drawRef(model, ctx1, ctx3) {
|
|
|
91
85
|
const s1 = f.get('strand');
|
|
92
86
|
const k1 = s1 === -1 ? x12 : x11;
|
|
93
87
|
const k2 = s1 === -1 ? x11 : x12;
|
|
94
|
-
// rev1/rev2 flip the direction of the CIGAR drawing in horizontally flipped
|
|
95
|
-
// modes. somewhat heuristically determined, but tested for
|
|
96
88
|
const rev1 = k1 < k2 ? 1 : -1;
|
|
97
89
|
const rev2 = (x21 < x22 ? 1 : -1) * s1;
|
|
98
|
-
// cx1/cx2 are the current x positions on top and bottom rows
|
|
99
90
|
let cx1 = k1;
|
|
100
91
|
let cx2 = s1 === -1 ? x22 : x21;
|
|
101
92
|
if (cigar.length && drawCIGAR) {
|
|
102
|
-
// continuingFlag skips drawing commands on very small CIGAR features
|
|
103
93
|
let continuingFlag = false;
|
|
104
|
-
// px1/px2 are the previous x positions on the top and bottom rows
|
|
105
94
|
let px1 = 0;
|
|
106
95
|
let px2 = 0;
|
|
107
96
|
const unitMultiplier2 = Math.floor(exports.MAX_COLOR_RANGE / cigar.length);
|
|
@@ -122,17 +111,11 @@ function drawRef(model, ctx1, ctx3) {
|
|
|
122
111
|
else if (op === 'D' || op === 'N') {
|
|
123
112
|
cx1 += d1 * rev1;
|
|
124
113
|
}
|
|
125
|
-
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
126
114
|
else if (op === 'I') {
|
|
127
115
|
cx2 += d2 * rev2;
|
|
128
116
|
}
|
|
129
|
-
// check that we are even drawing in view here, e.g. that all
|
|
130
|
-
// points are not all less than 0 or greater than width
|
|
131
117
|
if (!(Math.max(px1, px2, cx1, cx2) < 0 ||
|
|
132
118
|
Math.min(px1, px2, cx1, cx2) > width)) {
|
|
133
|
-
// if it is a small feature and not the last element of the
|
|
134
|
-
// CIGAR (which could skip rendering it entire if we did turn
|
|
135
|
-
// it on), then turn on continuing flag
|
|
136
119
|
const isNotLast = j < cigar.length - 2;
|
|
137
120
|
if (Math.abs(cx1 - px1) <= 1 &&
|
|
138
121
|
Math.abs(cx2 - px2) <= 1 &&
|
|
@@ -140,9 +123,6 @@ function drawRef(model, ctx1, ctx3) {
|
|
|
140
123
|
continuingFlag = true;
|
|
141
124
|
}
|
|
142
125
|
else {
|
|
143
|
-
// allow rendering the dominant color when using continuing
|
|
144
|
-
// flag if the last element of continuing was a large
|
|
145
|
-
// feature, else just use match
|
|
146
126
|
ctx1.fillStyle =
|
|
147
127
|
colorMap[(continuingFlag && d1 > 1) || d2 > 1 ? op : 'M'];
|
|
148
128
|
continuingFlag = false;
|
|
@@ -163,7 +143,6 @@ function drawRef(model, ctx1, ctx3) {
|
|
|
163
143
|
}
|
|
164
144
|
}
|
|
165
145
|
}
|
|
166
|
-
// draw click map
|
|
167
146
|
const ctx2 = (_a = model.clickMapCanvas) === null || _a === void 0 ? void 0 : _a.getContext('2d');
|
|
168
147
|
if (!ctx2) {
|
|
169
148
|
return;
|
|
@@ -174,7 +153,6 @@ function drawRef(model, ctx1, ctx3) {
|
|
|
174
153
|
const feature = featPositions[i];
|
|
175
154
|
const idx = i * unitMultiplier + 1;
|
|
176
155
|
ctx2.fillStyle = makeColor(idx);
|
|
177
|
-
// too many click map false positives with colored stroked lines
|
|
178
156
|
(0, util_2.drawMatchSimple)({
|
|
179
157
|
cb: ctx => {
|
|
180
158
|
ctx.fill();
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import PluginManager from '@jbrowse/core/PluginManager';
|
|
1
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
2
|
export default function LinearSyntenyDisplayF(pluginManager: PluginManager): void;
|
|
@@ -15,23 +15,32 @@ 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
39
|
exports.default = LinearSyntenyDisplayF;
|
|
40
|
+
const react_1 = require("react");
|
|
30
41
|
const DisplayType_1 = __importDefault(require("@jbrowse/core/pluggableElementTypes/DisplayType"));
|
|
31
|
-
// locals
|
|
32
42
|
const configSchemaF_1 = __importDefault(require("./configSchemaF"));
|
|
33
43
|
const model_1 = __importDefault(require("./model"));
|
|
34
|
-
const react_1 = require("react");
|
|
35
44
|
function LinearSyntenyDisplayF(pluginManager) {
|
|
36
45
|
pluginManager.addDisplayType(() => {
|
|
37
46
|
const configSchema = (0, configSchemaF_1.default)(pluginManager);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import type { AnyConfigurationSchemaType } from '@jbrowse/core/configuration';
|
|
2
|
+
import type { Feature } from '@jbrowse/core/util';
|
|
3
|
+
import type { Instance } from 'mobx-state-tree';
|
|
4
4
|
interface Pos {
|
|
5
5
|
offsetPx: number;
|
|
6
6
|
}
|
|
@@ -12,11 +12,6 @@ export interface FeatPos {
|
|
|
12
12
|
f: Feature;
|
|
13
13
|
cigar: string[];
|
|
14
14
|
}
|
|
15
|
-
/**
|
|
16
|
-
* #stateModel LinearSyntenyDisplay
|
|
17
|
-
* extends
|
|
18
|
-
* - [LinearComparativeDisplay](../linearcomparativedisplay)
|
|
19
|
-
*/
|
|
20
15
|
declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): import("mobx-state-tree").IModelType<{
|
|
21
16
|
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
22
17
|
type: import("mobx-state-tree").ISimpleType<string>;
|
|
@@ -25,13 +20,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
25
20
|
type: import("mobx-state-tree").ISimpleType<"LinearComparativeDisplay">;
|
|
26
21
|
configuration: AnyConfigurationSchemaType;
|
|
27
22
|
} & {
|
|
28
|
-
/**
|
|
29
|
-
* #property
|
|
30
|
-
*/
|
|
31
23
|
type: import("mobx-state-tree").ISimpleType<"LinearSyntenyDisplay">;
|
|
32
|
-
/**
|
|
33
|
-
* #property
|
|
34
|
-
*/
|
|
35
24
|
configuration: AnyConfigurationSchemaType;
|
|
36
25
|
}, {
|
|
37
26
|
rendererTypeName: string;
|
|
@@ -92,7 +81,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
92
81
|
setRpcDriverName(rpcDriverName: string): void;
|
|
93
82
|
reload(): void;
|
|
94
83
|
} & {
|
|
95
|
-
renderInProgress:
|
|
84
|
+
renderInProgress: string | undefined;
|
|
96
85
|
features: Feature[] | undefined;
|
|
97
86
|
message: string | undefined;
|
|
98
87
|
} & {
|
|
@@ -113,12 +102,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
113
102
|
setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({
|
|
114
103
|
[x: string]: any;
|
|
115
104
|
} & import("mobx-state-tree/dist/internal").NonEmptyObject & any & import("mobx-state-tree").IStateTreeNode<AnyConfigurationSchemaType>);
|
|
116
|
-
} & import("mobx-state-tree"
|
|
117
|
-
* #volatile
|
|
118
|
-
* canvas for drawing mouseover shading this is separate from the other
|
|
119
|
-
* code for speed: don't have to redraw entire canvas to do a feature's
|
|
120
|
-
* mouseover shading
|
|
121
|
-
*/).IStateTreeNode<AnyConfigurationSchemaType>);
|
|
105
|
+
} & import("mobx-state-tree").IStateTreeNode<AnyConfigurationSchemaType>);
|
|
122
106
|
} & import("mobx-state-tree").IStateTreeNode<AnyConfigurationSchemaType>;
|
|
123
107
|
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
124
108
|
rendererTypeName: string;
|
|
@@ -179,7 +163,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
179
163
|
setRpcDriverName(rpcDriverName: string): void;
|
|
180
164
|
reload(): void;
|
|
181
165
|
} & {
|
|
182
|
-
renderInProgress:
|
|
166
|
+
renderInProgress: string | undefined;
|
|
183
167
|
features: Feature[] | undefined;
|
|
184
168
|
message: string | undefined;
|
|
185
169
|
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
@@ -248,14 +232,14 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
248
232
|
setRpcDriverName(rpcDriverName: string): void;
|
|
249
233
|
reload(): void;
|
|
250
234
|
} & {
|
|
251
|
-
renderInProgress:
|
|
235
|
+
renderInProgress: string | undefined;
|
|
252
236
|
features: Feature[] | undefined;
|
|
253
237
|
message: string | undefined;
|
|
254
238
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
255
239
|
highResolutionScaling: number;
|
|
256
240
|
};
|
|
257
241
|
} & {
|
|
258
|
-
setLoading(
|
|
242
|
+
setLoading(newStopToken: string): void;
|
|
259
243
|
setMessage(messageText: string): void;
|
|
260
244
|
setRendered(args?: {
|
|
261
245
|
features: Feature[];
|
|
@@ -264,106 +248,28 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
264
248
|
} & {
|
|
265
249
|
afterAttach(): void;
|
|
266
250
|
} & {
|
|
267
|
-
/**
|
|
268
|
-
* #volatile
|
|
269
|
-
* canvas used for drawing visible screen
|
|
270
|
-
*/
|
|
271
251
|
mainCanvas: HTMLCanvasElement | null;
|
|
272
|
-
/**
|
|
273
|
-
* #volatile
|
|
274
|
-
* canvas used for drawing click map with feature ids this renders a
|
|
275
|
-
* unique color per alignment, so that it can be re-traced after a
|
|
276
|
-
* feature click with getImageData at that pixel
|
|
277
|
-
*/
|
|
278
252
|
clickMapCanvas: HTMLCanvasElement | null;
|
|
279
|
-
/**
|
|
280
|
-
* #volatile
|
|
281
|
-
* canvas used for drawing click map with cigar data this can show if you
|
|
282
|
-
* are mousing over a insertion/deletion. it is similar in purpose to the
|
|
283
|
-
* clickMapRef but was not feasible to pack this into the clickMapRef
|
|
284
|
-
*/
|
|
285
253
|
cigarClickMapCanvas: HTMLCanvasElement | null;
|
|
286
|
-
/**
|
|
287
|
-
* #volatile
|
|
288
|
-
* canvas for drawing mouseover shading this is separate from the other
|
|
289
|
-
* code for speed: don't have to redraw entire canvas to do a feature's
|
|
290
|
-
* mouseover shading
|
|
291
|
-
*/
|
|
292
254
|
mouseoverCanvas: HTMLCanvasElement | null;
|
|
293
|
-
/**
|
|
294
|
-
* #volatile
|
|
295
|
-
* assigned by reaction
|
|
296
|
-
*/
|
|
297
255
|
featPositions: FeatPos[];
|
|
298
|
-
/**
|
|
299
|
-
* #volatile
|
|
300
|
-
* currently mouse'd over feature
|
|
301
|
-
*/
|
|
302
256
|
mouseoverId: string | undefined;
|
|
303
|
-
/**
|
|
304
|
-
* #volatile
|
|
305
|
-
* currently click'd over feature
|
|
306
|
-
*/
|
|
307
257
|
clickId: string | undefined;
|
|
308
|
-
/**
|
|
309
|
-
* #volatile
|
|
310
|
-
* currently mouseover'd CIGAR subfeature
|
|
311
|
-
*/
|
|
312
258
|
cigarMouseoverId: number;
|
|
313
259
|
} & {
|
|
314
|
-
/**
|
|
315
|
-
* #action
|
|
316
|
-
*/
|
|
317
260
|
setFeatPositions(arg: FeatPos[]): void;
|
|
318
|
-
/**
|
|
319
|
-
* #action
|
|
320
|
-
*/
|
|
321
261
|
setMainCanvasRef(ref: HTMLCanvasElement | null): void;
|
|
322
|
-
/**
|
|
323
|
-
* #action
|
|
324
|
-
*/
|
|
325
262
|
setClickMapCanvasRef(ref: HTMLCanvasElement | null): void;
|
|
326
|
-
/**
|
|
327
|
-
* #action
|
|
328
|
-
*/
|
|
329
263
|
setCigarClickMapCanvasRef(ref: HTMLCanvasElement | null): void;
|
|
330
|
-
/**
|
|
331
|
-
* #action
|
|
332
|
-
*/
|
|
333
264
|
setMouseoverCanvasRef(ref: HTMLCanvasElement | null): void;
|
|
334
|
-
/**
|
|
335
|
-
* #action
|
|
336
|
-
*/
|
|
337
265
|
setMouseoverId(arg?: string): void;
|
|
338
|
-
/**
|
|
339
|
-
* #action
|
|
340
|
-
*/
|
|
341
266
|
setCigarMouseoverId(arg: number): void;
|
|
342
|
-
/**
|
|
343
|
-
* #action
|
|
344
|
-
*/
|
|
345
267
|
setClickId(arg?: string): void;
|
|
346
268
|
} & {
|
|
347
|
-
/**
|
|
348
|
-
* #getter
|
|
349
|
-
*/
|
|
350
269
|
readonly adapterConfig: any;
|
|
351
|
-
/**
|
|
352
|
-
* #getter
|
|
353
|
-
*/
|
|
354
270
|
readonly trackIds: string[];
|
|
355
|
-
/**
|
|
356
|
-
* #getter
|
|
357
|
-
*/
|
|
358
271
|
readonly numFeats: number;
|
|
359
|
-
/**
|
|
360
|
-
* #getter
|
|
361
|
-
* used for synteny svg rendering
|
|
362
|
-
*/
|
|
363
272
|
readonly ready: boolean;
|
|
364
|
-
/**
|
|
365
|
-
* #getter
|
|
366
|
-
*/
|
|
367
273
|
readonly featMap: {
|
|
368
274
|
[k: string]: FeatPos;
|
|
369
275
|
};
|
|
@@ -15,140 +15,73 @@ 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 mobx_state_tree_1 = require("mobx-state-tree");
|
|
30
39
|
const configuration_1 = require("@jbrowse/core/configuration");
|
|
31
|
-
|
|
40
|
+
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
32
41
|
const stateModelFactory_1 = __importDefault(require("../LinearComparativeDisplay/stateModelFactory"));
|
|
33
|
-
/**
|
|
34
|
-
* #stateModel LinearSyntenyDisplay
|
|
35
|
-
* extends
|
|
36
|
-
* - [LinearComparativeDisplay](../linearcomparativedisplay)
|
|
37
|
-
*/
|
|
38
42
|
function stateModelFactory(configSchema) {
|
|
39
43
|
return mobx_state_tree_1.types
|
|
40
44
|
.compose('LinearSyntenyDisplay', (0, stateModelFactory_1.default)(configSchema), mobx_state_tree_1.types.model({
|
|
41
|
-
/**
|
|
42
|
-
* #property
|
|
43
|
-
*/
|
|
44
45
|
type: mobx_state_tree_1.types.literal('LinearSyntenyDisplay'),
|
|
45
|
-
/**
|
|
46
|
-
* #property
|
|
47
|
-
*/
|
|
48
46
|
configuration: (0, configuration_1.ConfigurationReference)(configSchema),
|
|
49
47
|
}))
|
|
50
48
|
.volatile(() => ({
|
|
51
|
-
/**
|
|
52
|
-
* #volatile
|
|
53
|
-
* canvas used for drawing visible screen
|
|
54
|
-
*/
|
|
55
49
|
mainCanvas: null,
|
|
56
|
-
/**
|
|
57
|
-
* #volatile
|
|
58
|
-
* canvas used for drawing click map with feature ids this renders a
|
|
59
|
-
* unique color per alignment, so that it can be re-traced after a
|
|
60
|
-
* feature click with getImageData at that pixel
|
|
61
|
-
*/
|
|
62
50
|
clickMapCanvas: null,
|
|
63
|
-
/**
|
|
64
|
-
* #volatile
|
|
65
|
-
* canvas used for drawing click map with cigar data this can show if you
|
|
66
|
-
* are mousing over a insertion/deletion. it is similar in purpose to the
|
|
67
|
-
* clickMapRef but was not feasible to pack this into the clickMapRef
|
|
68
|
-
*/
|
|
69
51
|
cigarClickMapCanvas: null,
|
|
70
|
-
/**
|
|
71
|
-
* #volatile
|
|
72
|
-
* canvas for drawing mouseover shading this is separate from the other
|
|
73
|
-
* code for speed: don't have to redraw entire canvas to do a feature's
|
|
74
|
-
* mouseover shading
|
|
75
|
-
*/
|
|
76
52
|
mouseoverCanvas: null,
|
|
77
|
-
/**
|
|
78
|
-
* #volatile
|
|
79
|
-
* assigned by reaction
|
|
80
|
-
*/
|
|
81
53
|
featPositions: [],
|
|
82
|
-
/**
|
|
83
|
-
* #volatile
|
|
84
|
-
* currently mouse'd over feature
|
|
85
|
-
*/
|
|
86
54
|
mouseoverId: undefined,
|
|
87
|
-
/**
|
|
88
|
-
* #volatile
|
|
89
|
-
* currently click'd over feature
|
|
90
|
-
*/
|
|
91
55
|
clickId: undefined,
|
|
92
|
-
/**
|
|
93
|
-
* #volatile
|
|
94
|
-
* currently mouseover'd CIGAR subfeature
|
|
95
|
-
*/
|
|
96
56
|
cigarMouseoverId: -1,
|
|
97
57
|
}))
|
|
98
58
|
.actions(self => ({
|
|
99
|
-
/**
|
|
100
|
-
* #action
|
|
101
|
-
*/
|
|
102
59
|
setFeatPositions(arg) {
|
|
103
60
|
self.featPositions = arg;
|
|
104
61
|
},
|
|
105
|
-
/**
|
|
106
|
-
* #action
|
|
107
|
-
*/
|
|
108
62
|
setMainCanvasRef(ref) {
|
|
109
63
|
self.mainCanvas = ref;
|
|
110
64
|
},
|
|
111
|
-
/**
|
|
112
|
-
* #action
|
|
113
|
-
*/
|
|
114
65
|
setClickMapCanvasRef(ref) {
|
|
115
66
|
self.clickMapCanvas = ref;
|
|
116
67
|
},
|
|
117
|
-
/**
|
|
118
|
-
* #action
|
|
119
|
-
*/
|
|
120
68
|
setCigarClickMapCanvasRef(ref) {
|
|
121
69
|
self.cigarClickMapCanvas = ref;
|
|
122
70
|
},
|
|
123
|
-
/**
|
|
124
|
-
* #action
|
|
125
|
-
*/
|
|
126
71
|
setMouseoverCanvasRef(ref) {
|
|
127
72
|
self.mouseoverCanvas = ref;
|
|
128
73
|
},
|
|
129
|
-
/**
|
|
130
|
-
* #action
|
|
131
|
-
*/
|
|
132
74
|
setMouseoverId(arg) {
|
|
133
75
|
self.mouseoverId = arg;
|
|
134
76
|
},
|
|
135
|
-
/**
|
|
136
|
-
* #action
|
|
137
|
-
*/
|
|
138
77
|
setCigarMouseoverId(arg) {
|
|
139
78
|
self.cigarMouseoverId = arg;
|
|
140
79
|
},
|
|
141
|
-
/**
|
|
142
|
-
* #action
|
|
143
|
-
*/
|
|
144
80
|
setClickId(arg) {
|
|
145
81
|
self.clickId = arg;
|
|
146
82
|
},
|
|
147
83
|
}))
|
|
148
84
|
.views(self => ({
|
|
149
|
-
/**
|
|
150
|
-
* #getter
|
|
151
|
-
*/
|
|
152
85
|
get adapterConfig() {
|
|
153
86
|
return {
|
|
154
87
|
name: self.parentTrack.configuration.adapter.type,
|
|
@@ -156,35 +89,21 @@ function stateModelFactory(configSchema) {
|
|
|
156
89
|
...(0, configuration_1.getConf)(self.parentTrack, 'adapter'),
|
|
157
90
|
};
|
|
158
91
|
},
|
|
159
|
-
/**
|
|
160
|
-
* #getter
|
|
161
|
-
*/
|
|
162
92
|
get trackIds() {
|
|
163
93
|
return (0, configuration_1.getConf)(self, 'trackIds');
|
|
164
94
|
},
|
|
165
|
-
/**
|
|
166
|
-
* #getter
|
|
167
|
-
*/
|
|
168
95
|
get numFeats() {
|
|
169
96
|
return self.featPositions.length;
|
|
170
97
|
},
|
|
171
|
-
/**
|
|
172
|
-
* #getter
|
|
173
|
-
* used for synteny svg rendering
|
|
174
|
-
*/
|
|
175
98
|
get ready() {
|
|
176
99
|
return this.numFeats > 0;
|
|
177
100
|
},
|
|
178
|
-
/**
|
|
179
|
-
* #getter
|
|
180
|
-
*/
|
|
181
101
|
get featMap() {
|
|
182
102
|
return Object.fromEntries(self.featPositions.map(f => [f.f.id(), f]));
|
|
183
103
|
},
|
|
184
104
|
}))
|
|
185
105
|
.actions(self => ({
|
|
186
106
|
afterAttach() {
|
|
187
|
-
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
188
107
|
;
|
|
189
108
|
(async () => {
|
|
190
109
|
try {
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { ExportSvgOptions } from '../model';
|
|
1
|
+
import type { ExportSvgOptions } from '../model';
|
|
3
2
|
export default function ExportSvgDialog({ model, handleClose, }: {
|
|
4
3
|
model: {
|
|
5
4
|
exportSvg(opts: ExportSvgOptions): Promise<void>;
|
|
6
5
|
};
|
|
7
6
|
handleClose: () => void;
|
|
8
|
-
}):
|
|
7
|
+
}): import("react/jsx-runtime").JSX.Element;
|