@jbrowse/plugin-dotplot-view 2.6.2 → 2.7.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/DotplotDisplay/components/DotplotDisplay.d.ts +3 -4
- package/dist/DotplotDisplay/components/DotplotDisplay.js +3 -3
- package/dist/DotplotDisplay/stateModelFactory.d.ts +4 -4
- package/dist/DotplotDisplay/stateModelFactory.js +3 -3
- package/dist/DotplotRenderer/DotplotRenderer.js +12 -4
- package/dist/DotplotRenderer/components/DotplotRendering.d.ts +2 -3
- package/dist/DotplotRenderer/components/DotplotRendering.js +3 -3
- package/dist/DotplotView/blockTypes.d.ts +1 -9
- package/dist/DotplotView/blockTypes.js +2 -15
- package/dist/DotplotView/components/Axes.js +37 -35
- package/dist/DotplotView/components/DotplotControls.d.ts +6 -0
- package/dist/DotplotView/components/DotplotControls.js +94 -0
- package/dist/DotplotView/components/DotplotTooltip.d.ts +0 -1
- package/dist/DotplotView/components/DotplotTooltip.js +1 -2
- package/dist/DotplotView/components/DotplotWarnings.d.ts +2 -2
- package/dist/DotplotView/components/DotplotWarnings.js +2 -1
- package/dist/DotplotView/components/Header.d.ts +2 -2
- package/dist/DotplotView/components/Header.js +5 -120
- package/dist/DotplotView/components/ImportCustomTrack.d.ts +1 -1
- package/dist/DotplotView/components/ImportCustomTrack.js +1 -1
- package/dist/DotplotView/components/ImportSyntenyTrackSelector.js +4 -1
- package/dist/DotplotView/components/PanButtons.d.ts +2 -2
- package/dist/DotplotView/components/PanButtons.js +2 -1
- package/dist/DotplotView/components/WarningDialog.d.ts +2 -2
- package/dist/DotplotView/components/WarningDialog.js +2 -1
- package/dist/DotplotView/components/util.js +2 -5
- package/dist/DotplotView/model.d.ts +74 -45
- package/dist/DotplotView/model.js +15 -4
- package/dist/DotplotView/svgcomponents/SVGBackground.js +2 -1
- package/dist/ServerSideRenderedBlockContent.d.ts +2 -2
- package/dist/ServerSideRenderedBlockContent.js +2 -1
- package/dist/ServerSideSyntenyRendering.d.ts +11 -16
- package/dist/ServerSideSyntenyRendering.js +3 -11
- package/esm/DotplotDisplay/components/DotplotDisplay.d.ts +3 -4
- package/esm/DotplotDisplay/components/DotplotDisplay.js +3 -3
- package/esm/DotplotDisplay/stateModelFactory.d.ts +4 -4
- package/esm/DotplotDisplay/stateModelFactory.js +3 -3
- package/esm/DotplotRenderer/DotplotRenderer.js +12 -4
- package/esm/DotplotRenderer/components/DotplotRendering.d.ts +2 -3
- package/esm/DotplotRenderer/components/DotplotRendering.js +3 -3
- package/esm/DotplotView/blockTypes.d.ts +1 -9
- package/esm/DotplotView/blockTypes.js +2 -15
- package/esm/DotplotView/components/Axes.js +37 -35
- package/esm/DotplotView/components/DotplotControls.d.ts +6 -0
- package/esm/DotplotView/components/DotplotControls.js +89 -0
- package/esm/DotplotView/components/DotplotTooltip.d.ts +0 -1
- package/esm/DotplotView/components/DotplotTooltip.js +1 -1
- package/esm/DotplotView/components/DotplotView.js +1 -1
- package/esm/DotplotView/components/DotplotWarnings.d.ts +2 -2
- package/esm/DotplotView/components/DotplotWarnings.js +2 -1
- package/esm/DotplotView/components/Header.d.ts +2 -2
- package/esm/DotplotView/components/Header.js +5 -97
- package/esm/DotplotView/components/ImportCustomTrack.d.ts +1 -1
- package/esm/DotplotView/components/ImportCustomTrack.js +1 -1
- package/esm/DotplotView/components/ImportSyntenyTrackSelector.js +4 -1
- package/esm/DotplotView/components/PanButtons.d.ts +2 -2
- package/esm/DotplotView/components/PanButtons.js +2 -1
- package/esm/DotplotView/components/WarningDialog.d.ts +2 -2
- package/esm/DotplotView/components/WarningDialog.js +2 -1
- package/esm/DotplotView/components/util.js +2 -5
- package/esm/DotplotView/model.d.ts +74 -45
- package/esm/DotplotView/model.js +15 -4
- package/esm/DotplotView/svgcomponents/SVGBackground.js +2 -1
- package/esm/ServerSideRenderedBlockContent.d.ts +2 -2
- package/esm/ServerSideRenderedBlockContent.js +2 -1
- package/esm/ServerSideSyntenyRendering.d.ts +11 -16
- package/esm/ServerSideSyntenyRendering.js +4 -12
- package/package.json +3 -3
|
@@ -58,15 +58,15 @@ export default function stateModelFactory(pm: PluginManager): import("mobx-state
|
|
|
58
58
|
readonly width: number;
|
|
59
59
|
readonly assemblyNames: string[];
|
|
60
60
|
readonly displayedRegionsTotalPx: number;
|
|
61
|
-
readonly maxOffset: number;
|
|
62
|
-
|
|
61
|
+
readonly maxOffset: number;
|
|
62
|
+
readonly minOffset: number; /**
|
|
63
|
+
* #stateModel DotplotView
|
|
64
|
+
* #category view
|
|
65
|
+
* extends `BaseViewModel`
|
|
63
66
|
*/
|
|
64
|
-
readonly minOffset: number;
|
|
65
67
|
readonly totalBp: number;
|
|
66
68
|
} & {
|
|
67
|
-
readonly dynamicBlocks: import("@jbrowse/core/util/blockTypes").BlockSet;
|
|
68
|
-
* #property
|
|
69
|
-
*/
|
|
69
|
+
readonly dynamicBlocks: import("@jbrowse/core/util/blockTypes").BlockSet;
|
|
70
70
|
readonly staticBlocks: import("@jbrowse/core/util/blockTypes").BlockSet;
|
|
71
71
|
readonly currBp: number;
|
|
72
72
|
} & {
|
|
@@ -82,14 +82,20 @@ export default function stateModelFactory(pm: PluginManager): import("mobx-state
|
|
|
82
82
|
reversed: boolean;
|
|
83
83
|
};
|
|
84
84
|
bpToPx({ refName, coord, regionNumber, }: {
|
|
85
|
-
refName: string;
|
|
85
|
+
refName: string; /**
|
|
86
|
+
* #property
|
|
87
|
+
*/
|
|
86
88
|
coord: number;
|
|
87
|
-
regionNumber?: number | undefined;
|
|
89
|
+
regionNumber?: number | undefined; /**
|
|
90
|
+
* #property
|
|
91
|
+
*/
|
|
88
92
|
}): number | undefined;
|
|
89
93
|
} & {
|
|
90
94
|
setFeatures(features: import("@jbrowse/core/util").Feature[]): void;
|
|
91
95
|
showAllRegions(): void;
|
|
92
|
-
zoomOut(): void;
|
|
96
|
+
zoomOut(): void; /**
|
|
97
|
+
* #property
|
|
98
|
+
*/
|
|
93
99
|
zoomIn(): void;
|
|
94
100
|
zoomTo(bpPerPx: number, offset?: number | undefined): number;
|
|
95
101
|
scrollTo(offsetPx: number): number;
|
|
@@ -137,15 +143,15 @@ export default function stateModelFactory(pm: PluginManager): import("mobx-state
|
|
|
137
143
|
readonly width: number;
|
|
138
144
|
readonly assemblyNames: string[];
|
|
139
145
|
readonly displayedRegionsTotalPx: number;
|
|
140
|
-
readonly maxOffset: number;
|
|
141
|
-
|
|
146
|
+
readonly maxOffset: number;
|
|
147
|
+
readonly minOffset: number; /**
|
|
148
|
+
* #stateModel DotplotView
|
|
149
|
+
* #category view
|
|
150
|
+
* extends `BaseViewModel`
|
|
142
151
|
*/
|
|
143
|
-
readonly minOffset: number;
|
|
144
152
|
readonly totalBp: number;
|
|
145
153
|
} & {
|
|
146
|
-
readonly dynamicBlocks: import("@jbrowse/core/util/blockTypes").BlockSet;
|
|
147
|
-
* #property
|
|
148
|
-
*/
|
|
154
|
+
readonly dynamicBlocks: import("@jbrowse/core/util/blockTypes").BlockSet;
|
|
149
155
|
readonly staticBlocks: import("@jbrowse/core/util/blockTypes").BlockSet;
|
|
150
156
|
readonly currBp: number;
|
|
151
157
|
} & {
|
|
@@ -161,14 +167,20 @@ export default function stateModelFactory(pm: PluginManager): import("mobx-state
|
|
|
161
167
|
reversed: boolean;
|
|
162
168
|
};
|
|
163
169
|
bpToPx({ refName, coord, regionNumber, }: {
|
|
164
|
-
refName: string;
|
|
170
|
+
refName: string; /**
|
|
171
|
+
* #property
|
|
172
|
+
*/
|
|
165
173
|
coord: number;
|
|
166
|
-
regionNumber?: number | undefined;
|
|
174
|
+
regionNumber?: number | undefined; /**
|
|
175
|
+
* #property
|
|
176
|
+
*/
|
|
167
177
|
}): number | undefined;
|
|
168
178
|
} & {
|
|
169
179
|
setFeatures(features: import("@jbrowse/core/util").Feature[]): void;
|
|
170
180
|
showAllRegions(): void;
|
|
171
|
-
zoomOut(): void;
|
|
181
|
+
zoomOut(): void; /**
|
|
182
|
+
* #property
|
|
183
|
+
*/
|
|
172
184
|
zoomIn(): void;
|
|
173
185
|
zoomTo(bpPerPx: number, offset?: number | undefined): number;
|
|
174
186
|
scrollTo(offsetPx: number): number;
|
|
@@ -201,28 +213,33 @@ export default function stateModelFactory(pm: PluginManager): import("mobx-state
|
|
|
201
213
|
readonly textSearchAdapter: any;
|
|
202
214
|
readonly adapterType: import("@jbrowse/core/pluggableElementTypes").AdapterType;
|
|
203
215
|
readonly viewMenuActions: import("@jbrowse/core/ui").MenuItem[];
|
|
204
|
-
readonly canConfigure:
|
|
216
|
+
readonly canConfigure: boolean | ({
|
|
217
|
+
[x: string]: any;
|
|
218
|
+
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
219
|
+
setSubschema(slotName: string, data: unknown): any;
|
|
220
|
+
} & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>) | undefined;
|
|
205
221
|
} & {
|
|
206
222
|
setMinimized(flag: boolean): void;
|
|
207
|
-
|
|
208
|
-
|
|
223
|
+
showDisplay(displayId: string, initialSnapshot?: {} | undefined): void; /**
|
|
224
|
+
* #property
|
|
225
|
+
*/
|
|
209
226
|
hideDisplay(displayId: string): number;
|
|
210
227
|
replaceDisplay(oldId: string, newId: string, initialSnapshot?: {} | undefined): void;
|
|
211
228
|
} & {
|
|
212
229
|
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 | {
|
|
213
|
-
type: string;
|
|
230
|
+
type: string;
|
|
231
|
+
label: string; /**
|
|
214
232
|
* #property
|
|
215
233
|
*/
|
|
216
|
-
label: string;
|
|
217
234
|
subMenu: {
|
|
218
235
|
type: string;
|
|
219
|
-
label: string;
|
|
220
|
-
* #property
|
|
221
|
-
*/
|
|
236
|
+
label: string;
|
|
222
237
|
checked: boolean;
|
|
223
238
|
onClick: () => void;
|
|
224
239
|
}[];
|
|
225
|
-
})[];
|
|
240
|
+
})[]; /**
|
|
241
|
+
* #property
|
|
242
|
+
*/
|
|
226
243
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
227
244
|
viewTrackConfigs: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IAnyModelType>;
|
|
228
245
|
}, {
|
|
@@ -329,15 +346,15 @@ export default function stateModelFactory(pm: PluginManager): import("mobx-state
|
|
|
329
346
|
readonly width: number;
|
|
330
347
|
readonly assemblyNames: string[];
|
|
331
348
|
readonly displayedRegionsTotalPx: number;
|
|
332
|
-
readonly maxOffset: number;
|
|
333
|
-
|
|
349
|
+
readonly maxOffset: number;
|
|
350
|
+
readonly minOffset: number; /**
|
|
351
|
+
* #stateModel DotplotView
|
|
352
|
+
* #category view
|
|
353
|
+
* extends `BaseViewModel`
|
|
334
354
|
*/
|
|
335
|
-
readonly minOffset: number;
|
|
336
355
|
readonly totalBp: number;
|
|
337
356
|
} & {
|
|
338
|
-
readonly dynamicBlocks: import("@jbrowse/core/util/blockTypes").BlockSet;
|
|
339
|
-
* #property
|
|
340
|
-
*/
|
|
357
|
+
readonly dynamicBlocks: import("@jbrowse/core/util/blockTypes").BlockSet;
|
|
341
358
|
readonly staticBlocks: import("@jbrowse/core/util/blockTypes").BlockSet;
|
|
342
359
|
readonly currBp: number;
|
|
343
360
|
} & {
|
|
@@ -353,14 +370,20 @@ export default function stateModelFactory(pm: PluginManager): import("mobx-state
|
|
|
353
370
|
reversed: boolean;
|
|
354
371
|
};
|
|
355
372
|
bpToPx({ refName, coord, regionNumber, }: {
|
|
356
|
-
refName: string;
|
|
373
|
+
refName: string; /**
|
|
374
|
+
* #property
|
|
375
|
+
*/
|
|
357
376
|
coord: number;
|
|
358
|
-
regionNumber?: number | undefined;
|
|
377
|
+
regionNumber?: number | undefined; /**
|
|
378
|
+
* #property
|
|
379
|
+
*/
|
|
359
380
|
}): number | undefined;
|
|
360
381
|
} & {
|
|
361
382
|
setFeatures(features: import("@jbrowse/core/util").Feature[]): void;
|
|
362
383
|
showAllRegions(): void;
|
|
363
|
-
zoomOut(): void;
|
|
384
|
+
zoomOut(): void; /**
|
|
385
|
+
* #property
|
|
386
|
+
*/
|
|
364
387
|
zoomIn(): void;
|
|
365
388
|
zoomTo(bpPerPx: number, offset?: number | undefined): number;
|
|
366
389
|
scrollTo(offsetPx: number): number;
|
|
@@ -407,15 +430,15 @@ export default function stateModelFactory(pm: PluginManager): import("mobx-state
|
|
|
407
430
|
readonly width: number;
|
|
408
431
|
readonly assemblyNames: string[];
|
|
409
432
|
readonly displayedRegionsTotalPx: number;
|
|
410
|
-
readonly maxOffset: number;
|
|
411
|
-
|
|
433
|
+
readonly maxOffset: number;
|
|
434
|
+
readonly minOffset: number; /**
|
|
435
|
+
* #stateModel DotplotView
|
|
436
|
+
* #category view
|
|
437
|
+
* extends `BaseViewModel`
|
|
412
438
|
*/
|
|
413
|
-
readonly minOffset: number;
|
|
414
439
|
readonly totalBp: number;
|
|
415
440
|
} & {
|
|
416
|
-
readonly dynamicBlocks: import("@jbrowse/core/util/blockTypes").BlockSet;
|
|
417
|
-
* #property
|
|
418
|
-
*/
|
|
441
|
+
readonly dynamicBlocks: import("@jbrowse/core/util/blockTypes").BlockSet;
|
|
419
442
|
readonly staticBlocks: import("@jbrowse/core/util/blockTypes").BlockSet;
|
|
420
443
|
readonly currBp: number;
|
|
421
444
|
} & {
|
|
@@ -431,14 +454,20 @@ export default function stateModelFactory(pm: PluginManager): import("mobx-state
|
|
|
431
454
|
reversed: boolean;
|
|
432
455
|
};
|
|
433
456
|
bpToPx({ refName, coord, regionNumber, }: {
|
|
434
|
-
refName: string;
|
|
457
|
+
refName: string; /**
|
|
458
|
+
* #property
|
|
459
|
+
*/
|
|
435
460
|
coord: number;
|
|
436
|
-
regionNumber?: number | undefined;
|
|
461
|
+
regionNumber?: number | undefined; /**
|
|
462
|
+
* #property
|
|
463
|
+
*/
|
|
437
464
|
}): number | undefined;
|
|
438
465
|
} & {
|
|
439
466
|
setFeatures(features: import("@jbrowse/core/util").Feature[]): void;
|
|
440
467
|
showAllRegions(): void;
|
|
441
|
-
zoomOut(): void;
|
|
468
|
+
zoomOut(): void; /**
|
|
469
|
+
* #property
|
|
470
|
+
*/
|
|
442
471
|
zoomIn(): void;
|
|
443
472
|
zoomTo(bpPerPx: number, offset?: number | undefined): number;
|
|
444
473
|
scrollTo(offsetPx: number): number;
|
package/esm/DotplotView/model.js
CHANGED
|
@@ -17,6 +17,15 @@ import { getBlockLabelKeysToHide, makeTicks } from './components/util';
|
|
|
17
17
|
// lazies
|
|
18
18
|
const ExportSvgDialog = lazy(() => import('./components/ExportSvgDialog'));
|
|
19
19
|
const ReturnToImportFormDialog = lazy(() => import('@jbrowse/core/ui/ReturnToImportFormDialog'));
|
|
20
|
+
const len = (a) => measureText(a.slice(0, 30));
|
|
21
|
+
const pxWidthForBlocks = (blocks, hide) => {
|
|
22
|
+
return max([
|
|
23
|
+
...blocks.filter(b => !hide.has(b.key)).map(b => len(b.refName)),
|
|
24
|
+
...blocks
|
|
25
|
+
.filter(b => !hide.has(b.key))
|
|
26
|
+
.map(b => len(b.end.toLocaleString('en-us'))),
|
|
27
|
+
]);
|
|
28
|
+
};
|
|
20
29
|
/**
|
|
21
30
|
* #stateModel DotplotView
|
|
22
31
|
* #category view
|
|
@@ -469,8 +478,11 @@ export default function stateModelFactory(pm) {
|
|
|
469
478
|
},
|
|
470
479
|
// if any of our assemblies are temporary assemblies
|
|
471
480
|
beforeDestroy() {
|
|
481
|
+
var _a;
|
|
472
482
|
const session = getSession(self);
|
|
473
|
-
|
|
483
|
+
for (const name in self.assemblyNames) {
|
|
484
|
+
(_a = session.removeTemporaryAssembly) === null || _a === void 0 ? void 0 : _a.call(session, name);
|
|
485
|
+
}
|
|
474
486
|
},
|
|
475
487
|
afterAttach() {
|
|
476
488
|
addDisposer(self, autorun(() => {
|
|
@@ -518,9 +530,8 @@ export default function stateModelFactory(pm) {
|
|
|
518
530
|
const voffset = vview.offsetPx;
|
|
519
531
|
const vhide = getBlockLabelKeysToHide(vblocks, viewHeight, voffset);
|
|
520
532
|
const hhide = getBlockLabelKeysToHide(hblocks, viewWidth, hoffset);
|
|
521
|
-
const
|
|
522
|
-
const
|
|
523
|
-
const bx = max(vblocks.filter(b => !vhide.has(b.key)).map(b => len(b.refName)));
|
|
533
|
+
const by = pxWidthForBlocks(hblocks, hhide);
|
|
534
|
+
const bx = pxWidthForBlocks(vblocks, vhide);
|
|
524
535
|
// these are set via autorun to avoid dependency cycle
|
|
525
536
|
self.setBorderY(Math.max(by + padding, 50));
|
|
526
537
|
self.setBorderX(Math.max(bx + padding, 50));
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useTheme } from '@mui/material';
|
|
3
|
+
import { stripAlpha } from '@jbrowse/core/util';
|
|
3
4
|
export default function SVGBackground({ width, height, }) {
|
|
4
5
|
const theme = useTheme();
|
|
5
|
-
return (React.createElement("rect", { x: 0, y: 0, width: width, height: height, fill: theme.palette.background.default }));
|
|
6
|
+
return (React.createElement("rect", { x: 0, y: 0, width: width, height: height, fill: stripAlpha(theme.palette.background.default) }));
|
|
6
7
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { CSSProperties } from 'react';
|
|
2
|
-
declare const
|
|
2
|
+
declare const ServerSideRenderedDotplotContent: ({ model, style, }: {
|
|
3
3
|
model: {
|
|
4
4
|
error?: unknown;
|
|
5
5
|
message?: string;
|
|
@@ -9,4 +9,4 @@ declare const _default: ({ model, style, }: {
|
|
|
9
9
|
};
|
|
10
10
|
style: CSSProperties;
|
|
11
11
|
}) => React.JSX.Element | null;
|
|
12
|
-
export default
|
|
12
|
+
export default ServerSideRenderedDotplotContent;
|
|
@@ -44,7 +44,7 @@ function BlockError({ error }) {
|
|
|
44
44
|
return (React.createElement("div", { className: classes.blockError },
|
|
45
45
|
React.createElement(Typography, null, `${error}`)));
|
|
46
46
|
}
|
|
47
|
-
|
|
47
|
+
const ServerSideRenderedDotplotContent = observer(function ({ model, style, }) {
|
|
48
48
|
if (model.error) {
|
|
49
49
|
return React.createElement(BlockError, { error: model.error, "data-testid": "reload_button" });
|
|
50
50
|
}
|
|
@@ -59,3 +59,4 @@ export default observer(function ({ model, style, }) {
|
|
|
59
59
|
}
|
|
60
60
|
return null;
|
|
61
61
|
});
|
|
62
|
+
export default ServerSideRenderedDotplotContent;
|
|
@@ -3,21 +3,16 @@ import React from 'react';
|
|
|
3
3
|
* A block whose content is rendered outside of the main thread and hydrated by this
|
|
4
4
|
* component.
|
|
5
5
|
*/
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
highResolutionScaling?: number;
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
|
-
}): React.JSX.Element;
|
|
17
|
-
declare namespace ServerSideSyntenyRendering {
|
|
18
|
-
var propTypes: {
|
|
19
|
-
model: import("prop-types").Validator<any>;
|
|
6
|
+
interface ModelType {
|
|
7
|
+
imageData: string;
|
|
8
|
+
style: Record<string, string>;
|
|
9
|
+
renderProps: {
|
|
10
|
+
width: number;
|
|
11
|
+
height: number;
|
|
12
|
+
highResolutionScaling?: number;
|
|
20
13
|
};
|
|
21
14
|
}
|
|
22
|
-
declare const
|
|
23
|
-
|
|
15
|
+
declare const ServerSideSyntenyRendering: ({ model, }: {
|
|
16
|
+
model: ModelType;
|
|
17
|
+
}) => React.JSX.Element;
|
|
18
|
+
export default ServerSideSyntenyRendering;
|
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/no-non-null-assertion */
|
|
2
1
|
import React, { useRef, useState, useEffect } from 'react';
|
|
3
|
-
import { observer
|
|
2
|
+
import { observer } from 'mobx-react';
|
|
4
3
|
import { drawImageOntoCanvasContext } from '@jbrowse/core/util/offscreenCanvasPonyfill';
|
|
5
|
-
|
|
6
|
-
* A block whose content is rendered outside of the main thread and hydrated by this
|
|
7
|
-
* component.
|
|
8
|
-
*/
|
|
9
|
-
function ServerSideSyntenyRendering({ model, }) {
|
|
4
|
+
const ServerSideSyntenyRendering = observer(function ({ model, }) {
|
|
10
5
|
const { imageData, style, renderProps } = model;
|
|
11
6
|
const { width, height, highResolutionScaling = 1 } = renderProps;
|
|
12
7
|
const featureCanvas = useRef(null);
|
|
@@ -21,8 +16,5 @@ function ServerSideSyntenyRendering({ model, }) {
|
|
|
21
16
|
setDone(true);
|
|
22
17
|
}, [height, imageData, width]);
|
|
23
18
|
return (React.createElement("canvas", { "data-testid": `prerendered_canvas${done ? '_done' : ''}`, ref: featureCanvas, width: width * highResolutionScaling, height: height * highResolutionScaling, style: { width, height, ...style } }));
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
model: PropTypes.observableObject.isRequired,
|
|
27
|
-
};
|
|
28
|
-
export default observer(ServerSideSyntenyRendering);
|
|
19
|
+
});
|
|
20
|
+
export default ServerSideSyntenyRendering;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jbrowse/plugin-dotplot-view",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.7.0",
|
|
4
4
|
"description": "JBrowse 2 dotplot view",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jbrowse",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"@jbrowse/plugin-alignments": "^2.0.0",
|
|
52
52
|
"@mui/material": "^5.0.0",
|
|
53
53
|
"mobx": "^6.0.0",
|
|
54
|
-
"mobx-react": "^
|
|
54
|
+
"mobx-react": "^9.0.0",
|
|
55
55
|
"mobx-state-tree": "^5.0.0",
|
|
56
56
|
"react": ">=16.8.0",
|
|
57
57
|
"react-dom": ">=16.8.0",
|
|
@@ -64,5 +64,5 @@
|
|
|
64
64
|
"publishConfig": {
|
|
65
65
|
"access": "public"
|
|
66
66
|
},
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "dbe7fb1af01fc89f833d2744635eb44a17365b41"
|
|
68
68
|
}
|