@jbrowse/plugin-linear-comparative-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/LGVSyntenyDisplay/components/LaunchSyntenyViewDialog.d.ts +1 -1
- package/dist/LGVSyntenyDisplay/components/LaunchSyntenyViewDialog.js +0 -2
- package/dist/LGVSyntenyDisplay/components/util.d.ts +3 -3
- package/dist/LGVSyntenyDisplay/components/util.js +0 -1
- 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 +104 -81
- package/dist/LGVSyntenyDisplay/model.js +1 -29
- 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 +1 -1
- package/dist/LinearComparativeView/components/Header.js +4 -5
- package/dist/LinearComparativeView/components/HeaderSearchBoxes.d.ts +1 -1
- package/dist/LinearComparativeView/components/HeaderSearchBoxes.js +3 -4
- package/dist/LinearComparativeView/components/LinearComparativeRenderArea.d.ts +1 -1
- package/dist/LinearComparativeView/components/LinearComparativeRenderArea.js +8 -15
- package/dist/LinearComparativeView/components/LinearComparativeView.d.ts +1 -1
- package/dist/LinearComparativeView/components/LinearComparativeView.js +2 -4
- package/dist/LinearComparativeView/components/Rubberband.d.ts +1 -1
- package/dist/LinearComparativeView/components/Rubberband.js +17 -19
- package/dist/LinearComparativeView/components/VerticalGuide.d.ts +1 -1
- package/dist/LinearComparativeView/components/VerticalGuide.js +1 -1
- package/dist/LinearComparativeView/index.d.ts +1 -1
- package/dist/LinearComparativeView/model.d.ts +6 -62
- package/dist/LinearComparativeView/model.js +3 -99
- package/dist/LinearReadVsRef/LinearReadVsRef.d.ts +1 -1
- package/dist/LinearReadVsRef/LinearReadVsRef.js +5 -19
- package/dist/LinearReadVsRef/index.d.ts +1 -1
- package/dist/LinearReadVsRef/index.js +0 -2
- package/dist/LinearSyntenyDisplay/afterAttach.d.ts +1 -1
- package/dist/LinearSyntenyDisplay/afterAttach.js +2 -9
- package/dist/LinearSyntenyDisplay/components/Component.d.ts +1 -1
- package/dist/LinearSyntenyDisplay/components/Component.js +2 -4
- package/dist/LinearSyntenyDisplay/components/LinearSyntenyRendering.d.ts +1 -1
- package/dist/LinearSyntenyDisplay/components/LinearSyntenyRendering.js +6 -23
- package/dist/LinearSyntenyDisplay/components/SyntenyContextMenu.d.ts +2 -2
- package/dist/LinearSyntenyDisplay/components/SyntenyContextMenu.js +1 -1
- package/dist/LinearSyntenyDisplay/components/SyntenyTooltip.js +1 -1
- 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 +1 -2
- package/dist/LinearSyntenyDisplay/model.d.ts +8 -102
- package/dist/LinearSyntenyDisplay/model.js +1 -92
- package/dist/LinearSyntenyView/components/ExportSvgDialog.d.ts +1 -1
- package/dist/LinearSyntenyView/components/ExportSvgDialog.js +2 -4
- package/dist/LinearSyntenyView/components/Icons.d.ts +1 -1
- package/dist/LinearSyntenyView/components/ImportForm/AddCustomTrack.d.ts +2 -2
- package/dist/LinearSyntenyView/components/ImportForm/AddCustomTrack.js +1 -1
- package/dist/LinearSyntenyView/components/ImportForm/LinearSyntenyImportForm.d.ts +1 -1
- package/dist/LinearSyntenyView/components/ImportForm/LinearSyntenyImportForm.js +6 -8
- package/dist/LinearSyntenyView/components/ImportForm/TrackSelector.d.ts +1 -1
- package/dist/LinearSyntenyView/components/ImportForm/TrackSelector.js +3 -5
- package/dist/LinearSyntenyView/components/ImportForm/TrackSelectorUtil.d.ts +3 -3
- package/dist/LinearSyntenyView/components/ImportForm/util.js +1 -3
- package/dist/LinearSyntenyView/components/LinearSyntenyView.d.ts +1 -1
- package/dist/LinearSyntenyView/components/LinearSyntenyView.js +0 -1
- package/dist/LinearSyntenyView/index.d.ts +1 -1
- package/dist/LinearSyntenyView/model.d.ts +5 -28
- package/dist/LinearSyntenyView/model.js +4 -41
- package/dist/LinearSyntenyView/svgcomponents/SVGBackground.js +1 -1
- package/dist/LinearSyntenyView/svgcomponents/SVGLinearGenomeView.d.ts +1 -1
- package/dist/LinearSyntenyView/svgcomponents/SVGLinearGenomeView.js +1 -1
- package/dist/LinearSyntenyView/svgcomponents/SVGLinearSyntenyView.d.ts +1 -1
- package/dist/LinearSyntenyView/svgcomponents/SVGLinearSyntenyView.js +5 -10
- package/dist/LinearSyntenyViewHelper/index.d.ts +1 -1
- package/dist/LinearSyntenyViewHelper/stateModelFactory.d.ts +2 -14
- package/dist/LinearSyntenyViewHelper/stateModelFactory.js +2 -29
- package/dist/SyntenyFeatureDetail/SyntenyFeatureDetail.d.ts +1 -1
- package/dist/SyntenyFeatureDetail/SyntenyFeatureDetail.js +4 -13
- package/dist/SyntenyFeatureDetail/index.d.ts +1 -1
- package/dist/SyntenyFeatureDetail/index.js +1 -7
- 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 +1 -1
- package/esm/LGVSyntenyDisplay/components/LaunchSyntenyViewDialog.js +0 -2
- package/esm/LGVSyntenyDisplay/components/util.d.ts +3 -3
- package/esm/LGVSyntenyDisplay/components/util.js +0 -1
- 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 +104 -81
- package/esm/LGVSyntenyDisplay/model.js +2 -30
- 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 +1 -1
- package/esm/LinearComparativeView/components/Header.js +4 -5
- package/esm/LinearComparativeView/components/HeaderSearchBoxes.d.ts +1 -1
- package/esm/LinearComparativeView/components/HeaderSearchBoxes.js +3 -4
- package/esm/LinearComparativeView/components/LinearComparativeRenderArea.d.ts +1 -1
- package/esm/LinearComparativeView/components/LinearComparativeRenderArea.js +8 -15
- package/esm/LinearComparativeView/components/LinearComparativeView.d.ts +1 -1
- package/esm/LinearComparativeView/components/LinearComparativeView.js +2 -4
- package/esm/LinearComparativeView/components/Rubberband.d.ts +1 -1
- package/esm/LinearComparativeView/components/Rubberband.js +18 -20
- package/esm/LinearComparativeView/components/VerticalGuide.d.ts +1 -1
- package/esm/LinearComparativeView/components/VerticalGuide.js +1 -1
- package/esm/LinearComparativeView/index.d.ts +1 -1
- package/esm/LinearComparativeView/model.d.ts +6 -62
- package/esm/LinearComparativeView/model.js +4 -100
- package/esm/LinearReadVsRef/LinearReadVsRef.d.ts +1 -1
- package/esm/LinearReadVsRef/LinearReadVsRef.js +5 -19
- 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 +2 -9
- package/esm/LinearSyntenyDisplay/components/Component.d.ts +1 -1
- package/esm/LinearSyntenyDisplay/components/Component.js +2 -4
- package/esm/LinearSyntenyDisplay/components/LinearSyntenyRendering.d.ts +1 -1
- package/esm/LinearSyntenyDisplay/components/LinearSyntenyRendering.js +8 -25
- package/esm/LinearSyntenyDisplay/components/SyntenyContextMenu.d.ts +2 -2
- package/esm/LinearSyntenyDisplay/components/SyntenyContextMenu.js +1 -1
- package/esm/LinearSyntenyDisplay/components/SyntenyTooltip.js +1 -1
- 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 +1 -1
- package/esm/LinearSyntenyView/components/ExportSvgDialog.js +2 -4
- package/esm/LinearSyntenyView/components/Icons.d.ts +1 -1
- package/esm/LinearSyntenyView/components/ImportForm/AddCustomTrack.d.ts +2 -2
- package/esm/LinearSyntenyView/components/ImportForm/AddCustomTrack.js +2 -2
- package/esm/LinearSyntenyView/components/ImportForm/LinearSyntenyImportForm.d.ts +1 -1
- package/esm/LinearSyntenyView/components/ImportForm/LinearSyntenyImportForm.js +6 -8
- package/esm/LinearSyntenyView/components/ImportForm/TrackSelector.d.ts +1 -1
- package/esm/LinearSyntenyView/components/ImportForm/TrackSelector.js +4 -6
- package/esm/LinearSyntenyView/components/ImportForm/TrackSelectorUtil.d.ts +3 -3
- package/esm/LinearSyntenyView/components/ImportForm/TrackSelectorUtil.js +1 -1
- package/esm/LinearSyntenyView/components/ImportForm/util.js +1 -3
- package/esm/LinearSyntenyView/components/LinearSyntenyView.d.ts +1 -1
- package/esm/LinearSyntenyView/components/LinearSyntenyView.js +0 -1
- package/esm/LinearSyntenyView/index.d.ts +1 -1
- package/esm/LinearSyntenyView/model.d.ts +5 -28
- package/esm/LinearSyntenyView/model.js +4 -41
- package/esm/LinearSyntenyView/svgcomponents/SVGBackground.js +1 -1
- package/esm/LinearSyntenyView/svgcomponents/SVGLinearGenomeView.d.ts +1 -1
- package/esm/LinearSyntenyView/svgcomponents/SVGLinearGenomeView.js +2 -2
- package/esm/LinearSyntenyView/svgcomponents/SVGLinearSyntenyView.d.ts +1 -1
- package/esm/LinearSyntenyView/svgcomponents/SVGLinearSyntenyView.js +6 -11
- package/esm/LinearSyntenyViewHelper/index.d.ts +1 -1
- package/esm/LinearSyntenyViewHelper/stateModelFactory.d.ts +2 -14
- package/esm/LinearSyntenyViewHelper/stateModelFactory.js +2 -29
- package/esm/SyntenyFeatureDetail/SyntenyFeatureDetail.d.ts +1 -1
- package/esm/SyntenyFeatureDetail/SyntenyFeatureDetail.js +4 -13
- package/esm/SyntenyFeatureDetail/index.d.ts +1 -1
- package/esm/SyntenyFeatureDetail/index.js +1 -7
- 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
|
@@ -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;
|
|
@@ -27,11 +27,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
exports.default = LinearSyntenyDisplayF;
|
|
30
|
+
const react_1 = require("react");
|
|
30
31
|
const DisplayType_1 = __importDefault(require("@jbrowse/core/pluggableElementTypes/DisplayType"));
|
|
31
|
-
// locals
|
|
32
32
|
const configSchemaF_1 = __importDefault(require("./configSchemaF"));
|
|
33
33
|
const model_1 = __importDefault(require("./model"));
|
|
34
|
-
const react_1 = require("react");
|
|
35
34
|
function LinearSyntenyDisplayF(pluginManager) {
|
|
36
35
|
pluginManager.addDisplayType(() => {
|
|
37
36
|
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
|
};
|
|
@@ -26,129 +26,52 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
30
29
|
const configuration_1 = require("@jbrowse/core/configuration");
|
|
31
|
-
|
|
30
|
+
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
32
31
|
const stateModelFactory_1 = __importDefault(require("../LinearComparativeDisplay/stateModelFactory"));
|
|
33
|
-
/**
|
|
34
|
-
* #stateModel LinearSyntenyDisplay
|
|
35
|
-
* extends
|
|
36
|
-
* - [LinearComparativeDisplay](../linearcomparativedisplay)
|
|
37
|
-
*/
|
|
38
32
|
function stateModelFactory(configSchema) {
|
|
39
33
|
return mobx_state_tree_1.types
|
|
40
34
|
.compose('LinearSyntenyDisplay', (0, stateModelFactory_1.default)(configSchema), mobx_state_tree_1.types.model({
|
|
41
|
-
/**
|
|
42
|
-
* #property
|
|
43
|
-
*/
|
|
44
35
|
type: mobx_state_tree_1.types.literal('LinearSyntenyDisplay'),
|
|
45
|
-
/**
|
|
46
|
-
* #property
|
|
47
|
-
*/
|
|
48
36
|
configuration: (0, configuration_1.ConfigurationReference)(configSchema),
|
|
49
37
|
}))
|
|
50
38
|
.volatile(() => ({
|
|
51
|
-
/**
|
|
52
|
-
* #volatile
|
|
53
|
-
* canvas used for drawing visible screen
|
|
54
|
-
*/
|
|
55
39
|
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
40
|
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
41
|
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
42
|
mouseoverCanvas: null,
|
|
77
|
-
/**
|
|
78
|
-
* #volatile
|
|
79
|
-
* assigned by reaction
|
|
80
|
-
*/
|
|
81
43
|
featPositions: [],
|
|
82
|
-
/**
|
|
83
|
-
* #volatile
|
|
84
|
-
* currently mouse'd over feature
|
|
85
|
-
*/
|
|
86
44
|
mouseoverId: undefined,
|
|
87
|
-
/**
|
|
88
|
-
* #volatile
|
|
89
|
-
* currently click'd over feature
|
|
90
|
-
*/
|
|
91
45
|
clickId: undefined,
|
|
92
|
-
/**
|
|
93
|
-
* #volatile
|
|
94
|
-
* currently mouseover'd CIGAR subfeature
|
|
95
|
-
*/
|
|
96
46
|
cigarMouseoverId: -1,
|
|
97
47
|
}))
|
|
98
48
|
.actions(self => ({
|
|
99
|
-
/**
|
|
100
|
-
* #action
|
|
101
|
-
*/
|
|
102
49
|
setFeatPositions(arg) {
|
|
103
50
|
self.featPositions = arg;
|
|
104
51
|
},
|
|
105
|
-
/**
|
|
106
|
-
* #action
|
|
107
|
-
*/
|
|
108
52
|
setMainCanvasRef(ref) {
|
|
109
53
|
self.mainCanvas = ref;
|
|
110
54
|
},
|
|
111
|
-
/**
|
|
112
|
-
* #action
|
|
113
|
-
*/
|
|
114
55
|
setClickMapCanvasRef(ref) {
|
|
115
56
|
self.clickMapCanvas = ref;
|
|
116
57
|
},
|
|
117
|
-
/**
|
|
118
|
-
* #action
|
|
119
|
-
*/
|
|
120
58
|
setCigarClickMapCanvasRef(ref) {
|
|
121
59
|
self.cigarClickMapCanvas = ref;
|
|
122
60
|
},
|
|
123
|
-
/**
|
|
124
|
-
* #action
|
|
125
|
-
*/
|
|
126
61
|
setMouseoverCanvasRef(ref) {
|
|
127
62
|
self.mouseoverCanvas = ref;
|
|
128
63
|
},
|
|
129
|
-
/**
|
|
130
|
-
* #action
|
|
131
|
-
*/
|
|
132
64
|
setMouseoverId(arg) {
|
|
133
65
|
self.mouseoverId = arg;
|
|
134
66
|
},
|
|
135
|
-
/**
|
|
136
|
-
* #action
|
|
137
|
-
*/
|
|
138
67
|
setCigarMouseoverId(arg) {
|
|
139
68
|
self.cigarMouseoverId = arg;
|
|
140
69
|
},
|
|
141
|
-
/**
|
|
142
|
-
* #action
|
|
143
|
-
*/
|
|
144
70
|
setClickId(arg) {
|
|
145
71
|
self.clickId = arg;
|
|
146
72
|
},
|
|
147
73
|
}))
|
|
148
74
|
.views(self => ({
|
|
149
|
-
/**
|
|
150
|
-
* #getter
|
|
151
|
-
*/
|
|
152
75
|
get adapterConfig() {
|
|
153
76
|
return {
|
|
154
77
|
name: self.parentTrack.configuration.adapter.type,
|
|
@@ -156,35 +79,21 @@ function stateModelFactory(configSchema) {
|
|
|
156
79
|
...(0, configuration_1.getConf)(self.parentTrack, 'adapter'),
|
|
157
80
|
};
|
|
158
81
|
},
|
|
159
|
-
/**
|
|
160
|
-
* #getter
|
|
161
|
-
*/
|
|
162
82
|
get trackIds() {
|
|
163
83
|
return (0, configuration_1.getConf)(self, 'trackIds');
|
|
164
84
|
},
|
|
165
|
-
/**
|
|
166
|
-
* #getter
|
|
167
|
-
*/
|
|
168
85
|
get numFeats() {
|
|
169
86
|
return self.featPositions.length;
|
|
170
87
|
},
|
|
171
|
-
/**
|
|
172
|
-
* #getter
|
|
173
|
-
* used for synteny svg rendering
|
|
174
|
-
*/
|
|
175
88
|
get ready() {
|
|
176
89
|
return this.numFeats > 0;
|
|
177
90
|
},
|
|
178
|
-
/**
|
|
179
|
-
* #getter
|
|
180
|
-
*/
|
|
181
91
|
get featMap() {
|
|
182
92
|
return Object.fromEntries(self.featPositions.map(f => [f.f.id(), f]));
|
|
183
93
|
},
|
|
184
94
|
}))
|
|
185
95
|
.actions(self => ({
|
|
186
96
|
afterAttach() {
|
|
187
|
-
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
188
97
|
;
|
|
189
98
|
(async () => {
|
|
190
99
|
try {
|
|
@@ -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 } }),
|
|
@@ -65,9 +65,7 @@ function ExportSvgDialog({ model, handleClose, }) {
|
|
|
65
65
|
react_1.default.createElement("br", null),
|
|
66
66
|
session.allThemes ? (react_1.default.createElement(TextField2, { select: true, label: "Theme", variant: "outlined", value: themeName, onChange: event => {
|
|
67
67
|
setThemeName(event.target.value);
|
|
68
|
-
} }, Object.entries(session.allThemes()).map(([key, val]) => (react_1.default.createElement(material_1.MenuItem, { key: key, value: key },
|
|
69
|
-
// @ts-expect-error
|
|
70
|
-
val.name || '(Unknown name)'))))) : null,
|
|
68
|
+
} }, Object.entries(session.allThemes()).map(([key, val]) => (react_1.default.createElement(material_1.MenuItem, { key: key, value: key }, val.name || '(Unknown name)'))))) : null,
|
|
71
69
|
offscreenCanvas ? (react_1.default.createElement(material_1.FormControlLabel, { control: react_1.default.createElement(material_1.Checkbox, { checked: rasterizeLayers, onChange: () => {
|
|
72
70
|
setRasterizeLayers(val => !val);
|
|
73
71
|
} }), 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"))),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { SvgIconProps } from '@mui/material';
|
|
2
|
+
import type { SvgIconProps } from '@mui/material';
|
|
3
3
|
export declare function Curves(props: SvgIconProps): React.JSX.Element;
|
|
4
4
|
export declare function StraightLines(props: SvgIconProps): React.JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
|
|
3
|
+
import type { SnapshotIn } from 'mobx-state-tree';
|
|
4
4
|
type Conf = SnapshotIn<AnyConfigurationModel>;
|
|
5
5
|
declare const ImportCustomTrack: ({ assembly1, assembly2, setUserOpenedSyntenyTrack, }: {
|
|
6
6
|
assembly1: string;
|
|
@@ -24,8 +24,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
const react_1 = __importStar(require("react"));
|
|
27
|
-
const material_1 = require("@mui/material");
|
|
28
27
|
const ui_1 = require("@jbrowse/core/ui");
|
|
28
|
+
const material_1 = require("@mui/material");
|
|
29
29
|
const mobx_react_1 = require("mobx-react");
|
|
30
30
|
const util_1 = require("./util");
|
|
31
31
|
function getAdapter({ radioOption, assembly1, assembly2, fileLocation, indexFileLocation, bed1Location, bed2Location, }) {
|
|
@@ -27,16 +27,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
const react_1 = __importStar(require("react"));
|
|
30
|
-
const material_1 = require("@mui/material");
|
|
31
|
-
const mui_1 = require("tss-react/mui");
|
|
32
|
-
const mobx_react_1 = require("mobx-react");
|
|
33
|
-
const util_1 = require("@jbrowse/core/util");
|
|
34
30
|
const ui_1 = require("@jbrowse/core/ui");
|
|
35
|
-
|
|
36
|
-
const Close_1 = __importDefault(require("@mui/icons-material/Close"));
|
|
31
|
+
const util_1 = require("@jbrowse/core/util");
|
|
37
32
|
const ArrowForwardIos_1 = __importDefault(require("@mui/icons-material/ArrowForwardIos"));
|
|
38
|
-
const
|
|
33
|
+
const Close_1 = __importDefault(require("@mui/icons-material/Close"));
|
|
34
|
+
const material_1 = require("@mui/material");
|
|
35
|
+
const mobx_react_1 = require("mobx-react");
|
|
36
|
+
const mui_1 = require("tss-react/mui");
|
|
39
37
|
const Spacer_1 = __importDefault(require("./Spacer"));
|
|
38
|
+
const TrackSelectorUtil_1 = __importDefault(require("./TrackSelectorUtil"));
|
|
40
39
|
const useStyles = (0, mui_1.makeStyles)()(theme => ({
|
|
41
40
|
importFormContainer: {
|
|
42
41
|
padding: theme.spacing(4),
|
|
@@ -118,7 +117,6 @@ const LinearSyntenyViewImportForm = (0, mobx_react_1.observer)(function ({ model
|
|
|
118
117
|
]);
|
|
119
118
|
} }, "Add row"),
|
|
120
119
|
react_1.default.createElement(material_1.Button, { className: classes.button, onClick: () => {
|
|
121
|
-
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
122
120
|
;
|
|
123
121
|
(async () => {
|
|
124
122
|
try {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { LinearSyntenyViewModel } from '../../model';
|
|
2
|
+
import type { LinearSyntenyViewModel } from '../../model';
|
|
3
3
|
declare const ImportSyntenyTrackSelector: ({ model, assembly1, assembly2, preConfiguredSyntenyTrack, setPreConfiguredSyntenyTrack, }: {
|
|
4
4
|
model: LinearSyntenyViewModel;
|
|
5
5
|
assembly1: string;
|
|
@@ -24,11 +24,11 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
const react_1 = __importStar(require("react"));
|
|
27
|
-
const
|
|
27
|
+
const configuration_1 = require("@jbrowse/core/configuration");
|
|
28
|
+
const ui_1 = require("@jbrowse/core/ui");
|
|
28
29
|
const util_1 = require("@jbrowse/core/util");
|
|
29
30
|
const tracks_1 = require("@jbrowse/core/util/tracks");
|
|
30
|
-
const
|
|
31
|
-
const configuration_1 = require("@jbrowse/core/configuration");
|
|
31
|
+
const material_1 = require("@mui/material");
|
|
32
32
|
const mobx_react_1 = require("mobx-react");
|
|
33
33
|
const ImportSyntenyTrackSelector = (0, mobx_react_1.observer)(function ({ model, assembly1, assembly2, preConfiguredSyntenyTrack, setPreConfiguredSyntenyTrack, }) {
|
|
34
34
|
var _a;
|
|
@@ -44,8 +44,6 @@ const ImportSyntenyTrackSelector = (0, mobx_react_1.observer)(function ({ model,
|
|
|
44
44
|
const resetTrack = ((_a = filteredTracks[0]) === null || _a === void 0 ? void 0 : _a.trackId) || '';
|
|
45
45
|
const [value, setValue] = (0, react_1.useState)(resetTrack);
|
|
46
46
|
(0, react_1.useEffect)(() => {
|
|
47
|
-
// sets track data in a useEffect because the initial load is needed as
|
|
48
|
-
// well as onChange's to the select box
|
|
49
47
|
if (value !== preConfiguredSyntenyTrack) {
|
|
50
48
|
setPreConfiguredSyntenyTrack(value);
|
|
51
49
|
}
|