@jbrowse/plugin-dotplot-view 2.11.1 → 2.12.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/DotplotView/1dview.d.ts +15 -42
- package/dist/DotplotView/components/DotplotControls.js +2 -2
- package/dist/DotplotView/components/DotplotView.js +25 -8
- package/dist/DotplotView/components/DotplotWarnings.js +4 -2
- package/dist/DotplotView/model.d.ts +50 -113
- package/esm/DotplotView/1dview.d.ts +15 -42
- package/esm/DotplotView/components/DotplotControls.js +2 -2
- package/esm/DotplotView/components/DotplotView.js +25 -8
- package/esm/DotplotView/components/DotplotWarnings.js +4 -2
- package/esm/DotplotView/model.d.ts +50 -113
- package/package.json +3 -5
- package/dist/DotplotView/blockTypes.d.ts +0 -53
- package/dist/DotplotView/blockTypes.js +0 -103
- package/esm/DotplotView/blockTypes.d.ts +0 -53
- package/esm/DotplotView/blockTypes.js +0 -95
|
@@ -3,7 +3,6 @@ import { LoadingEllipses, Menu, ResizeHandle } from '@jbrowse/core/ui';
|
|
|
3
3
|
import { observer } from 'mobx-react';
|
|
4
4
|
import { transaction } from 'mobx';
|
|
5
5
|
import { makeStyles } from 'tss-react/mui';
|
|
6
|
-
import normalizeWheel from 'normalize-wheel';
|
|
7
6
|
import ImportForm from './ImportForm';
|
|
8
7
|
import Header from './Header';
|
|
9
8
|
import Grid from './Grid';
|
|
@@ -76,6 +75,7 @@ const DotplotViewInternal = observer(function ({ model, }) {
|
|
|
76
75
|
const distanceY = useRef(0);
|
|
77
76
|
const scheduled = useRef(false);
|
|
78
77
|
const [ctrlKeyWasUsed, setCtrlKeyWasUsed] = useState(false);
|
|
78
|
+
const [ctrlKeyDown, setCtrlKeyDown] = useState(false);
|
|
79
79
|
const svg = ((_a = ref.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect()) || blank;
|
|
80
80
|
const rootRect = ((_b = ref.current) === null || _b === void 0 ? void 0 : _b.getBoundingClientRect()) || blank;
|
|
81
81
|
const mousedown = getOffset(mousedownClient, svg);
|
|
@@ -92,11 +92,10 @@ const DotplotViewInternal = observer(function ({ model, }) {
|
|
|
92
92
|
(cursorMode === 'crosshair' && !ctrlKeyWasUsed);
|
|
93
93
|
// use non-React wheel handler to properly prevent body scrolling
|
|
94
94
|
useEffect(() => {
|
|
95
|
-
function onWheel(
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
distanceY.current -= event.pixelY;
|
|
95
|
+
function onWheel(event) {
|
|
96
|
+
event.preventDefault();
|
|
97
|
+
distanceX.current += event.deltaX;
|
|
98
|
+
distanceY.current -= event.deltaY;
|
|
100
99
|
if (!scheduled.current) {
|
|
101
100
|
scheduled.current = true;
|
|
102
101
|
window.requestAnimationFrame(() => {
|
|
@@ -147,6 +146,24 @@ const DotplotViewInternal = observer(function ({ model, }) {
|
|
|
147
146
|
hview,
|
|
148
147
|
vview,
|
|
149
148
|
]);
|
|
149
|
+
useEffect(() => {
|
|
150
|
+
function globalCtrlKeyDown(event) {
|
|
151
|
+
if (event.metaKey || event.ctrlKey) {
|
|
152
|
+
setCtrlKeyDown(true);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
function globalCtrlKeyUp(event) {
|
|
156
|
+
if (!event.metaKey && !event.ctrlKey) {
|
|
157
|
+
setCtrlKeyDown(false);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
window.addEventListener('keydown', globalCtrlKeyDown);
|
|
161
|
+
window.addEventListener('keyup', globalCtrlKeyUp);
|
|
162
|
+
return () => {
|
|
163
|
+
window.removeEventListener('keydown', globalCtrlKeyDown);
|
|
164
|
+
window.addEventListener('keyup', globalCtrlKeyUp);
|
|
165
|
+
};
|
|
166
|
+
}, []);
|
|
150
167
|
// detect a mouseup after a mousedown was submitted, autoremoves mouseup once
|
|
151
168
|
// that single mouseup is set
|
|
152
169
|
useEffect(() => {
|
|
@@ -191,12 +208,12 @@ const DotplotViewInternal = observer(function ({ model, }) {
|
|
|
191
208
|
React.createElement("div", { ref: ref, className: classes.content },
|
|
192
209
|
mouseOvered && validSelect ? (React.createElement(TooltipWhereMouseovered, { model: model, mouserect: mouserect, mouserectClient: mouserectClient, xdistance: xdistance })) : null,
|
|
193
210
|
validSelect ? (React.createElement(TooltipWhereClicked, { model: model, mousedown: mousedown, mousedownClient: mousedownClient, xdistance: xdistance, ydistance: ydistance })) : null,
|
|
194
|
-
React.createElement("div", { style: { cursor:
|
|
211
|
+
React.createElement("div", { style: { cursor: ctrlKeyDown ? 'pointer' : cursorMode }, onMouseDown: event => {
|
|
195
212
|
if (event.button === 0) {
|
|
196
213
|
const { clientX, clientY } = event;
|
|
197
214
|
setMouseDownClient([clientX, clientY]);
|
|
198
215
|
setMouseCurrClient([clientX, clientY]);
|
|
199
|
-
setCtrlKeyWasUsed(
|
|
216
|
+
setCtrlKeyWasUsed(ctrlKeyDown);
|
|
200
217
|
}
|
|
201
218
|
} },
|
|
202
219
|
React.createElement(Grid, { model: model }, validSelect && mousedown && mouserect ? (React.createElement("rect", { fill: "rgba(255,0,0,0.3)", x: Math.min(mouserect[0], mousedown[0]), y: Math.min(mouserect[1], mousedown[1]), width: Math.abs(xdistance), height: Math.abs(ydistance) })) : null)),
|
|
@@ -6,10 +6,12 @@ const WarningDialog = lazy(() => import('./WarningDialog'));
|
|
|
6
6
|
const DotplotWarnings = observer(function ({ model, }) {
|
|
7
7
|
const trackWarnings = model.tracks.filter(t => { var _a; return (_a = t.displays[0].warnings) === null || _a === void 0 ? void 0 : _a.length; });
|
|
8
8
|
const [shown, setShown] = useState(false);
|
|
9
|
-
|
|
9
|
+
const [hide, setHide] = useState(false);
|
|
10
|
+
return trackWarnings.length && !hide ? (React.createElement(Alert, { severity: "warning" },
|
|
10
11
|
"Warnings during render",
|
|
11
12
|
' ',
|
|
12
13
|
React.createElement(Button, { onClick: () => setShown(true) }, "More info"),
|
|
13
|
-
shown ? (React.createElement(WarningDialog, { trackWarnings: trackWarnings, handleClose: () => setShown(false) })) : null
|
|
14
|
+
shown ? (React.createElement(WarningDialog, { trackWarnings: trackWarnings, handleClose: () => setShown(false) })) : null,
|
|
15
|
+
React.createElement(Button, { variant: "contained", onClick: () => setHide(true) }, "Dismiss"))) : null;
|
|
14
16
|
});
|
|
15
17
|
export default DotplotWarnings;
|
|
@@ -36,16 +36,7 @@ export default function stateModelFactory(pm: PluginManager): import("mobx-state
|
|
|
36
36
|
drawCigar: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
37
37
|
hview: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IModelType<{
|
|
38
38
|
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
39
|
-
displayedRegions: import("mobx-state-tree").
|
|
40
|
-
refName: import("mobx-state-tree").ISimpleType<string>;
|
|
41
|
-
start: import("mobx-state-tree").ISimpleType<number>;
|
|
42
|
-
end: import("mobx-state-tree").ISimpleType<number>;
|
|
43
|
-
reversed: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
44
|
-
} & {
|
|
45
|
-
assemblyName: import("mobx-state-tree").ISimpleType<string>;
|
|
46
|
-
}, {
|
|
47
|
-
setRefName(newRefName: string): void;
|
|
48
|
-
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
39
|
+
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]>;
|
|
49
40
|
bpPerPx: import("mobx-state-tree").IType<number | undefined, number, number>;
|
|
50
41
|
offsetPx: import("mobx-state-tree").IType<number | undefined, number, number>;
|
|
51
42
|
interRegionPaddingWidth: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<number>, [undefined]>;
|
|
@@ -74,28 +65,26 @@ export default function stateModelFactory(pm: PluginManager): import("mobx-state
|
|
|
74
65
|
index: number;
|
|
75
66
|
refName: string;
|
|
76
67
|
oob: boolean;
|
|
77
|
-
assemblyName: string;
|
|
78
|
-
* #property
|
|
79
|
-
*/
|
|
68
|
+
assemblyName: string;
|
|
80
69
|
offset: number;
|
|
81
70
|
start: number;
|
|
82
|
-
end: number;
|
|
83
|
-
|
|
84
|
-
*/
|
|
85
|
-
reversed: boolean;
|
|
71
|
+
end: number;
|
|
72
|
+
reversed?: boolean | undefined;
|
|
86
73
|
};
|
|
87
74
|
bpToPx({ refName, coord, regionNumber, }: {
|
|
88
|
-
refName: string;
|
|
89
|
-
* #property
|
|
90
|
-
*/
|
|
75
|
+
refName: string;
|
|
91
76
|
coord: number;
|
|
92
77
|
regionNumber?: number | undefined;
|
|
93
78
|
}): number | undefined;
|
|
94
79
|
} & {
|
|
95
|
-
setFeatures(features: import("@jbrowse/core/util").Feature[]): void;
|
|
80
|
+
setFeatures(features: import("@jbrowse/core/util").Feature[]): void; /**
|
|
81
|
+
* #property
|
|
82
|
+
*/
|
|
96
83
|
showAllRegions(): void;
|
|
97
84
|
zoomOut(): void;
|
|
98
|
-
zoomIn(): void;
|
|
85
|
+
zoomIn(): void; /**
|
|
86
|
+
* #property
|
|
87
|
+
*/
|
|
99
88
|
zoomTo(bpPerPx: number, offset?: number | undefined): number;
|
|
100
89
|
scrollTo(offsetPx: number): number;
|
|
101
90
|
centerAt(coord: number, refName: string | undefined, regionNumber: number): void;
|
|
@@ -117,16 +106,7 @@ export default function stateModelFactory(pm: PluginManager): import("mobx-state
|
|
|
117
106
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>, [undefined]>;
|
|
118
107
|
vview: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IModelType<{
|
|
119
108
|
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
120
|
-
displayedRegions: import("mobx-state-tree").
|
|
121
|
-
refName: import("mobx-state-tree").ISimpleType<string>;
|
|
122
|
-
start: import("mobx-state-tree").ISimpleType<number>;
|
|
123
|
-
end: import("mobx-state-tree").ISimpleType<number>;
|
|
124
|
-
reversed: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
125
|
-
} & {
|
|
126
|
-
assemblyName: import("mobx-state-tree").ISimpleType<string>;
|
|
127
|
-
}, {
|
|
128
|
-
setRefName(newRefName: string): void;
|
|
129
|
-
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
109
|
+
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]>;
|
|
130
110
|
bpPerPx: import("mobx-state-tree").IType<number | undefined, number, number>;
|
|
131
111
|
offsetPx: import("mobx-state-tree").IType<number | undefined, number, number>;
|
|
132
112
|
interRegionPaddingWidth: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<number>, [undefined]>;
|
|
@@ -155,28 +135,26 @@ export default function stateModelFactory(pm: PluginManager): import("mobx-state
|
|
|
155
135
|
index: number;
|
|
156
136
|
refName: string;
|
|
157
137
|
oob: boolean;
|
|
158
|
-
assemblyName: string;
|
|
159
|
-
* #property
|
|
160
|
-
*/
|
|
138
|
+
assemblyName: string;
|
|
161
139
|
offset: number;
|
|
162
140
|
start: number;
|
|
163
|
-
end: number;
|
|
164
|
-
|
|
165
|
-
*/
|
|
166
|
-
reversed: boolean;
|
|
141
|
+
end: number;
|
|
142
|
+
reversed?: boolean | undefined;
|
|
167
143
|
};
|
|
168
144
|
bpToPx({ refName, coord, regionNumber, }: {
|
|
169
|
-
refName: string;
|
|
170
|
-
* #property
|
|
171
|
-
*/
|
|
145
|
+
refName: string;
|
|
172
146
|
coord: number;
|
|
173
147
|
regionNumber?: number | undefined;
|
|
174
148
|
}): number | undefined;
|
|
175
149
|
} & {
|
|
176
|
-
setFeatures(features: import("@jbrowse/core/util").Feature[]): void;
|
|
150
|
+
setFeatures(features: import("@jbrowse/core/util").Feature[]): void; /**
|
|
151
|
+
* #property
|
|
152
|
+
*/
|
|
177
153
|
showAllRegions(): void;
|
|
178
154
|
zoomOut(): void;
|
|
179
|
-
zoomIn(): void;
|
|
155
|
+
zoomIn(): void; /**
|
|
156
|
+
* #property
|
|
157
|
+
*/
|
|
180
158
|
zoomTo(bpPerPx: number, offset?: number | undefined): number;
|
|
181
159
|
scrollTo(offsetPx: number): number;
|
|
182
160
|
centerAt(coord: number, refName: string | undefined, regionNumber: number): void;
|
|
@@ -221,18 +199,12 @@ export default function stateModelFactory(pm: PluginManager): import("mobx-state
|
|
|
221
199
|
} & {
|
|
222
200
|
trackMenuItems(): (import("@jbrowse/core/ui").MenuDivider | import("@jbrowse/core/ui").MenuSubHeader | import("@jbrowse/core/ui").NormalMenuItem | import("@jbrowse/core/ui").CheckboxMenuItem | import("@jbrowse/core/ui").RadioMenuItem | import("@jbrowse/core/ui").SubMenuItem | {
|
|
223
201
|
type: string;
|
|
224
|
-
label: string;
|
|
225
|
-
* #property
|
|
226
|
-
*/
|
|
202
|
+
label: string;
|
|
227
203
|
subMenu: {
|
|
228
204
|
type: string;
|
|
229
|
-
label: string;
|
|
230
|
-
* #property
|
|
231
|
-
*/
|
|
205
|
+
label: string;
|
|
232
206
|
checked: boolean;
|
|
233
|
-
onClick: () => void;
|
|
234
|
-
* #property
|
|
235
|
-
*/
|
|
207
|
+
onClick: () => void;
|
|
236
208
|
}[];
|
|
237
209
|
})[];
|
|
238
210
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
@@ -307,25 +279,7 @@ export default function stateModelFactory(pm: PluginManager): import("mobx-state
|
|
|
307
279
|
*/
|
|
308
280
|
readonly views: ({
|
|
309
281
|
id: string;
|
|
310
|
-
displayedRegions: import("mobx-state-tree").
|
|
311
|
-
refName: import("mobx-state-tree").ISimpleType<string>;
|
|
312
|
-
start: import("mobx-state-tree").ISimpleType<number>;
|
|
313
|
-
end: import("mobx-state-tree").ISimpleType<number>;
|
|
314
|
-
reversed: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
315
|
-
} & {
|
|
316
|
-
assemblyName: import("mobx-state-tree").ISimpleType<string>;
|
|
317
|
-
}, {
|
|
318
|
-
setRefName(newRefName: string): void;
|
|
319
|
-
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>> & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IArrayType<import("mobx-state-tree").IModelType<{
|
|
320
|
-
refName: import("mobx-state-tree").ISimpleType<string>;
|
|
321
|
-
start: import("mobx-state-tree").ISimpleType<number>;
|
|
322
|
-
end: import("mobx-state-tree").ISimpleType<number>;
|
|
323
|
-
reversed: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
324
|
-
} & {
|
|
325
|
-
assemblyName: import("mobx-state-tree").ISimpleType<string>;
|
|
326
|
-
}, {
|
|
327
|
-
setRefName(newRefName: string): void;
|
|
328
|
-
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>>;
|
|
282
|
+
displayedRegions: import("@jbrowse/core/util").Region[] & import("mobx-state-tree").IStateTreeNode<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]>>;
|
|
329
283
|
bpPerPx: number;
|
|
330
284
|
offsetPx: number;
|
|
331
285
|
interRegionPaddingWidth: number;
|
|
@@ -354,28 +308,26 @@ export default function stateModelFactory(pm: PluginManager): import("mobx-state
|
|
|
354
308
|
index: number;
|
|
355
309
|
refName: string;
|
|
356
310
|
oob: boolean;
|
|
357
|
-
assemblyName: string;
|
|
358
|
-
* #property
|
|
359
|
-
*/
|
|
311
|
+
assemblyName: string;
|
|
360
312
|
offset: number;
|
|
361
313
|
start: number;
|
|
362
|
-
end: number;
|
|
363
|
-
|
|
364
|
-
*/
|
|
365
|
-
reversed: boolean;
|
|
314
|
+
end: number;
|
|
315
|
+
reversed?: boolean | undefined;
|
|
366
316
|
};
|
|
367
317
|
bpToPx({ refName, coord, regionNumber, }: {
|
|
368
|
-
refName: string;
|
|
369
|
-
* #property
|
|
370
|
-
*/
|
|
318
|
+
refName: string;
|
|
371
319
|
coord: number;
|
|
372
320
|
regionNumber?: number | undefined;
|
|
373
321
|
}): number | undefined;
|
|
374
322
|
} & {
|
|
375
|
-
setFeatures(features: import("@jbrowse/core/util").Feature[]): void;
|
|
323
|
+
setFeatures(features: import("@jbrowse/core/util").Feature[]): void; /**
|
|
324
|
+
* #property
|
|
325
|
+
*/
|
|
376
326
|
showAllRegions(): void;
|
|
377
327
|
zoomOut(): void;
|
|
378
|
-
zoomIn(): void;
|
|
328
|
+
zoomIn(): void; /**
|
|
329
|
+
* #property
|
|
330
|
+
*/
|
|
379
331
|
zoomTo(bpPerPx: number, offset?: number | undefined): number;
|
|
380
332
|
scrollTo(offsetPx: number): number;
|
|
381
333
|
centerAt(coord: number, refName: string | undefined, regionNumber: number): void;
|
|
@@ -396,16 +348,7 @@ export default function stateModelFactory(pm: PluginManager): import("mobx-state
|
|
|
396
348
|
readonly width: any;
|
|
397
349
|
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IModelType<{
|
|
398
350
|
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
399
|
-
displayedRegions: import("mobx-state-tree").
|
|
400
|
-
refName: import("mobx-state-tree").ISimpleType<string>;
|
|
401
|
-
start: import("mobx-state-tree").ISimpleType<number>;
|
|
402
|
-
end: import("mobx-state-tree").ISimpleType<number>;
|
|
403
|
-
reversed: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
404
|
-
} & {
|
|
405
|
-
assemblyName: import("mobx-state-tree").ISimpleType<string>;
|
|
406
|
-
}, {
|
|
407
|
-
setRefName(newRefName: string): void;
|
|
408
|
-
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
351
|
+
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]>;
|
|
409
352
|
bpPerPx: import("mobx-state-tree").IType<number | undefined, number, number>;
|
|
410
353
|
offsetPx: import("mobx-state-tree").IType<number | undefined, number, number>;
|
|
411
354
|
interRegionPaddingWidth: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<number>, [undefined]>;
|
|
@@ -434,28 +377,26 @@ export default function stateModelFactory(pm: PluginManager): import("mobx-state
|
|
|
434
377
|
index: number;
|
|
435
378
|
refName: string;
|
|
436
379
|
oob: boolean;
|
|
437
|
-
assemblyName: string;
|
|
438
|
-
* #property
|
|
439
|
-
*/
|
|
380
|
+
assemblyName: string;
|
|
440
381
|
offset: number;
|
|
441
382
|
start: number;
|
|
442
|
-
end: number;
|
|
443
|
-
|
|
444
|
-
*/
|
|
445
|
-
reversed: boolean;
|
|
383
|
+
end: number;
|
|
384
|
+
reversed?: boolean | undefined;
|
|
446
385
|
};
|
|
447
386
|
bpToPx({ refName, coord, regionNumber, }: {
|
|
448
|
-
refName: string;
|
|
449
|
-
* #property
|
|
450
|
-
*/
|
|
387
|
+
refName: string;
|
|
451
388
|
coord: number;
|
|
452
389
|
regionNumber?: number | undefined;
|
|
453
390
|
}): number | undefined;
|
|
454
391
|
} & {
|
|
455
|
-
setFeatures(features: import("@jbrowse/core/util").Feature[]): void;
|
|
392
|
+
setFeatures(features: import("@jbrowse/core/util").Feature[]): void; /**
|
|
393
|
+
* #property
|
|
394
|
+
*/
|
|
456
395
|
showAllRegions(): void;
|
|
457
396
|
zoomOut(): void;
|
|
458
|
-
zoomIn(): void;
|
|
397
|
+
zoomIn(): void; /**
|
|
398
|
+
* #property
|
|
399
|
+
*/
|
|
459
400
|
zoomTo(bpPerPx: number, offset?: number | undefined): number;
|
|
460
401
|
scrollTo(offsetPx: number): number;
|
|
461
402
|
centerAt(coord: number, refName: string | undefined, regionNumber: number): void;
|
|
@@ -567,15 +508,11 @@ export default function stateModelFactory(pm: PluginManager): import("mobx-state
|
|
|
567
508
|
index: number;
|
|
568
509
|
refName: string;
|
|
569
510
|
oob: boolean;
|
|
570
|
-
assemblyName: string;
|
|
571
|
-
* #property
|
|
572
|
-
*/
|
|
511
|
+
assemblyName: string;
|
|
573
512
|
offset: number;
|
|
574
513
|
start: number;
|
|
575
|
-
end: number;
|
|
576
|
-
|
|
577
|
-
*/
|
|
578
|
-
reversed: boolean;
|
|
514
|
+
end: number;
|
|
515
|
+
reversed?: boolean | undefined;
|
|
579
516
|
}[] | undefined;
|
|
580
517
|
/**
|
|
581
518
|
* #action
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jbrowse/plugin-dotplot-view",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.12.0",
|
|
4
4
|
"description": "JBrowse 2 dotplot view",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jbrowse",
|
|
@@ -40,10 +40,8 @@
|
|
|
40
40
|
"@mui/icons-material": "^5.0.1",
|
|
41
41
|
"@mui/x-data-grid": "^7.0.0",
|
|
42
42
|
"@types/file-saver": "^2.0.1",
|
|
43
|
-
"@types/normalize-wheel": "^1.0.0",
|
|
44
43
|
"clone": "^2.1.2",
|
|
45
|
-
"file-saver": "^2.0.0"
|
|
46
|
-
"normalize-wheel": "^1.0.1"
|
|
44
|
+
"file-saver": "^2.0.0"
|
|
47
45
|
},
|
|
48
46
|
"peerDependencies": {
|
|
49
47
|
"@jbrowse/core": "^2.0.0",
|
|
@@ -63,5 +61,5 @@
|
|
|
63
61
|
"publishConfig": {
|
|
64
62
|
"access": "public"
|
|
65
63
|
},
|
|
66
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "935f2602d29abc737bb1f493a922b6218d023ae2"
|
|
67
65
|
}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
type Func<T> = (value: BaseBlock, index: number, array: BaseBlock[]) => T;
|
|
2
|
-
export declare class BlockSet {
|
|
3
|
-
blocks: BaseBlock[];
|
|
4
|
-
constructor(blocks?: BaseBlock[]);
|
|
5
|
-
push(block: BaseBlock): void;
|
|
6
|
-
getBlocks(): BaseBlock[];
|
|
7
|
-
map<T, U = this>(func: Func<T>, thisarg?: U): T[];
|
|
8
|
-
forEach<T, U = this>(func: Func<T>, thisarg?: U): void;
|
|
9
|
-
get length(): number;
|
|
10
|
-
get totalWidthPx(): number;
|
|
11
|
-
get offsetPx(): number;
|
|
12
|
-
get contentBlocks(): BaseBlock[];
|
|
13
|
-
}
|
|
14
|
-
export declare class BaseBlock {
|
|
15
|
-
reversed?: boolean;
|
|
16
|
-
refName: string;
|
|
17
|
-
start: number;
|
|
18
|
-
end: number;
|
|
19
|
-
assemblyName: string;
|
|
20
|
-
key: string;
|
|
21
|
-
widthPx: number;
|
|
22
|
-
offsetPx: number;
|
|
23
|
-
/**
|
|
24
|
-
* a block that should be shown as filled with data
|
|
25
|
-
*/
|
|
26
|
-
constructor(data: Record<string, any>);
|
|
27
|
-
toRegion(): {
|
|
28
|
-
refName: string;
|
|
29
|
-
start: number;
|
|
30
|
-
end: number;
|
|
31
|
-
assemblyName: string;
|
|
32
|
-
reversed: boolean | undefined;
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
export declare class ContentBlock extends BaseBlock {
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* marker block representing one or more blocks that are
|
|
39
|
-
* too small to be shown at the current zoom level
|
|
40
|
-
*/
|
|
41
|
-
export declare class ElidedBlock extends BaseBlock {
|
|
42
|
-
widthPx: number;
|
|
43
|
-
elidedBlockCount: number;
|
|
44
|
-
constructor(data: Record<string, any>);
|
|
45
|
-
push(otherBlock: ElidedBlock): void;
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* marker block that sits between two different displayed regions
|
|
49
|
-
* and provides a thick border between them
|
|
50
|
-
*/
|
|
51
|
-
export declare class InterRegionPaddingBlock extends BaseBlock {
|
|
52
|
-
}
|
|
53
|
-
export {};
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.InterRegionPaddingBlock = exports.ElidedBlock = exports.ContentBlock = exports.BaseBlock = exports.BlockSet = void 0;
|
|
4
|
-
const util_1 = require("@jbrowse/core/util");
|
|
5
|
-
class BlockSet {
|
|
6
|
-
constructor(blocks = []) {
|
|
7
|
-
this.blocks = blocks;
|
|
8
|
-
}
|
|
9
|
-
push(block) {
|
|
10
|
-
if (block instanceof ElidedBlock && this.blocks.length > 0) {
|
|
11
|
-
const lastBlock = this.blocks.at(-1);
|
|
12
|
-
if (lastBlock instanceof ElidedBlock) {
|
|
13
|
-
lastBlock.push(block);
|
|
14
|
-
return;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
this.blocks.push(block);
|
|
18
|
-
}
|
|
19
|
-
getBlocks() {
|
|
20
|
-
return this.blocks;
|
|
21
|
-
}
|
|
22
|
-
map(func, thisarg) {
|
|
23
|
-
// eslint-disable-next-line unicorn/no-array-method-this-argument
|
|
24
|
-
return this.blocks.map(func, thisarg);
|
|
25
|
-
}
|
|
26
|
-
forEach(func, thisarg) {
|
|
27
|
-
// eslint-disable-next-line unicorn/no-array-method-this-argument
|
|
28
|
-
return this.blocks.forEach(func, thisarg);
|
|
29
|
-
}
|
|
30
|
-
get length() {
|
|
31
|
-
return this.blocks.length;
|
|
32
|
-
}
|
|
33
|
-
get totalWidthPx() {
|
|
34
|
-
return this.blocks.length
|
|
35
|
-
? (0, util_1.sum)(this.blocks.map(blocks => blocks.widthPx))
|
|
36
|
-
: 0;
|
|
37
|
-
}
|
|
38
|
-
get offsetPx() {
|
|
39
|
-
return this.blocks.length ? this.blocks[0].offsetPx : 0;
|
|
40
|
-
}
|
|
41
|
-
get contentBlocks() {
|
|
42
|
-
return this.blocks.filter(block => block instanceof ContentBlock);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
exports.BlockSet = BlockSet;
|
|
46
|
-
class BaseBlock {
|
|
47
|
-
/**
|
|
48
|
-
* a block that should be shown as filled with data
|
|
49
|
-
*/
|
|
50
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
51
|
-
constructor(data) {
|
|
52
|
-
this.widthPx = 0;
|
|
53
|
-
this.offsetPx = 0;
|
|
54
|
-
Object.assign(this, data);
|
|
55
|
-
this.assemblyName = data.assemblyName;
|
|
56
|
-
this.refName = data.refName;
|
|
57
|
-
this.start = data.start;
|
|
58
|
-
this.end = data.end;
|
|
59
|
-
this.key = data.key;
|
|
60
|
-
}
|
|
61
|
-
toRegion() {
|
|
62
|
-
return {
|
|
63
|
-
refName: this.refName,
|
|
64
|
-
start: this.start,
|
|
65
|
-
end: this.end,
|
|
66
|
-
assemblyName: this.assemblyName,
|
|
67
|
-
reversed: this.reversed,
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
exports.BaseBlock = BaseBlock;
|
|
72
|
-
class ContentBlock extends BaseBlock {
|
|
73
|
-
}
|
|
74
|
-
exports.ContentBlock = ContentBlock;
|
|
75
|
-
/**
|
|
76
|
-
* marker block representing one or more blocks that are
|
|
77
|
-
* too small to be shown at the current zoom level
|
|
78
|
-
*/
|
|
79
|
-
class ElidedBlock extends BaseBlock {
|
|
80
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
81
|
-
constructor(data) {
|
|
82
|
-
super(data);
|
|
83
|
-
this.elidedBlockCount = 0;
|
|
84
|
-
this.widthPx = data.widthPx;
|
|
85
|
-
}
|
|
86
|
-
push(otherBlock) {
|
|
87
|
-
this.elidedBlockCount += 1;
|
|
88
|
-
if (otherBlock) {
|
|
89
|
-
this.refName = '';
|
|
90
|
-
this.start = 0;
|
|
91
|
-
this.end = 0;
|
|
92
|
-
this.widthPx += otherBlock.widthPx;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
exports.ElidedBlock = ElidedBlock;
|
|
97
|
-
/**
|
|
98
|
-
* marker block that sits between two different displayed regions
|
|
99
|
-
* and provides a thick border between them
|
|
100
|
-
*/
|
|
101
|
-
class InterRegionPaddingBlock extends BaseBlock {
|
|
102
|
-
}
|
|
103
|
-
exports.InterRegionPaddingBlock = InterRegionPaddingBlock;
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
type Func<T> = (value: BaseBlock, index: number, array: BaseBlock[]) => T;
|
|
2
|
-
export declare class BlockSet {
|
|
3
|
-
blocks: BaseBlock[];
|
|
4
|
-
constructor(blocks?: BaseBlock[]);
|
|
5
|
-
push(block: BaseBlock): void;
|
|
6
|
-
getBlocks(): BaseBlock[];
|
|
7
|
-
map<T, U = this>(func: Func<T>, thisarg?: U): T[];
|
|
8
|
-
forEach<T, U = this>(func: Func<T>, thisarg?: U): void;
|
|
9
|
-
get length(): number;
|
|
10
|
-
get totalWidthPx(): number;
|
|
11
|
-
get offsetPx(): number;
|
|
12
|
-
get contentBlocks(): BaseBlock[];
|
|
13
|
-
}
|
|
14
|
-
export declare class BaseBlock {
|
|
15
|
-
reversed?: boolean;
|
|
16
|
-
refName: string;
|
|
17
|
-
start: number;
|
|
18
|
-
end: number;
|
|
19
|
-
assemblyName: string;
|
|
20
|
-
key: string;
|
|
21
|
-
widthPx: number;
|
|
22
|
-
offsetPx: number;
|
|
23
|
-
/**
|
|
24
|
-
* a block that should be shown as filled with data
|
|
25
|
-
*/
|
|
26
|
-
constructor(data: Record<string, any>);
|
|
27
|
-
toRegion(): {
|
|
28
|
-
refName: string;
|
|
29
|
-
start: number;
|
|
30
|
-
end: number;
|
|
31
|
-
assemblyName: string;
|
|
32
|
-
reversed: boolean | undefined;
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
export declare class ContentBlock extends BaseBlock {
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* marker block representing one or more blocks that are
|
|
39
|
-
* too small to be shown at the current zoom level
|
|
40
|
-
*/
|
|
41
|
-
export declare class ElidedBlock extends BaseBlock {
|
|
42
|
-
widthPx: number;
|
|
43
|
-
elidedBlockCount: number;
|
|
44
|
-
constructor(data: Record<string, any>);
|
|
45
|
-
push(otherBlock: ElidedBlock): void;
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* marker block that sits between two different displayed regions
|
|
49
|
-
* and provides a thick border between them
|
|
50
|
-
*/
|
|
51
|
-
export declare class InterRegionPaddingBlock extends BaseBlock {
|
|
52
|
-
}
|
|
53
|
-
export {};
|