@jbrowse/plugin-dotplot-view 2.13.1 → 2.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ComparativeRenderer/index.d.ts +2 -2
- package/dist/DotplotDisplay/index.js +0 -1
- package/dist/DotplotDisplay/stateModelFactory.d.ts +3 -5
- package/dist/DotplotDisplay/stateModelFactory.js +0 -1
- package/dist/DotplotReadVsRef/index.js +3 -1
- package/dist/DotplotRenderer/ComparativeRenderRpc.d.ts +2 -2
- package/dist/DotplotRenderer/DotplotRenderer.d.ts +1 -0
- package/dist/DotplotRenderer/DotplotRenderer.js +4 -3
- package/dist/DotplotView/1dview.js +0 -2
- package/dist/DotplotView/components/Axes.js +1 -1
- package/dist/DotplotView/components/DotplotControls.js +30 -10
- package/dist/DotplotView/components/DotplotTooltip.js +2 -2
- package/dist/DotplotView/components/DotplotView.js +15 -27
- package/dist/DotplotView/components/DotplotWarnings.js +9 -3
- package/dist/DotplotView/components/ExportSvgDialog.js +13 -5
- package/dist/DotplotView/components/Grid.js +2 -2
- package/dist/DotplotView/components/ImportForm/ImportCustomTrack.js +14 -4
- package/dist/DotplotView/components/ImportForm/ImportSyntenyTrackSelector.js +3 -1
- package/dist/DotplotView/components/ImportForm/index.js +9 -3
- package/dist/DotplotView/components/WarningDialog.js +4 -3
- package/dist/DotplotView/components/util.js +4 -2
- package/dist/DotplotView/model.d.ts +1 -7
- package/dist/DotplotView/model.js +12 -13
- package/dist/DotplotView/svgcomponents/SVGDotplotView.js +3 -2
- package/dist/LaunchDotplotView.js +4 -2
- package/dist/ServerSideRenderedBlockContent.js +7 -3
- package/dist/ServerSideSyntenyRendering.d.ts +2 -2
- package/dist/ServerSideSyntenyRendering.js +1 -1
- package/esm/ComparativeRenderer/index.d.ts +2 -2
- package/esm/DotplotDisplay/index.js +0 -1
- package/esm/DotplotDisplay/stateModelFactory.d.ts +3 -5
- package/esm/DotplotDisplay/stateModelFactory.js +0 -1
- package/esm/DotplotReadVsRef/index.js +3 -1
- package/esm/DotplotRenderer/ComparativeRenderRpc.d.ts +2 -2
- package/esm/DotplotRenderer/DotplotRenderer.d.ts +1 -0
- package/esm/DotplotRenderer/DotplotRenderer.js +4 -3
- package/esm/DotplotView/1dview.js +0 -2
- package/esm/DotplotView/components/Axes.js +1 -1
- package/esm/DotplotView/components/DotplotControls.js +30 -10
- package/esm/DotplotView/components/DotplotTooltip.js +2 -2
- package/esm/DotplotView/components/DotplotView.js +15 -27
- package/esm/DotplotView/components/DotplotWarnings.js +9 -3
- package/esm/DotplotView/components/ExportSvgDialog.js +13 -5
- package/esm/DotplotView/components/Grid.js +2 -2
- package/esm/DotplotView/components/ImportForm/ImportCustomTrack.js +14 -4
- package/esm/DotplotView/components/ImportForm/ImportSyntenyTrackSelector.js +3 -1
- package/esm/DotplotView/components/ImportForm/index.js +9 -3
- package/esm/DotplotView/components/WarningDialog.js +4 -3
- package/esm/DotplotView/components/util.js +4 -2
- package/esm/DotplotView/model.d.ts +1 -7
- package/esm/DotplotView/model.js +12 -13
- package/esm/DotplotView/svgcomponents/SVGDotplotView.js +3 -2
- package/esm/LaunchDotplotView.js +4 -2
- package/esm/ServerSideRenderedBlockContent.js +7 -3
- package/esm/ServerSideSyntenyRendering.d.ts +2 -2
- package/esm/ServerSideSyntenyRendering.js +1 -1
- package/package.json +3 -3
package/esm/DotplotView/model.js
CHANGED
|
@@ -275,15 +275,6 @@ export default function stateModelFactory(pm) {
|
|
|
275
275
|
setError(e) {
|
|
276
276
|
self.volatileError = e;
|
|
277
277
|
},
|
|
278
|
-
/**
|
|
279
|
-
* #action
|
|
280
|
-
* removes the view itself from the state tree entirely by calling the
|
|
281
|
-
* parent removeView
|
|
282
|
-
*/
|
|
283
|
-
closeView() {
|
|
284
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
285
|
-
getParent(self, 2).removeView(self);
|
|
286
|
-
},
|
|
287
278
|
/**
|
|
288
279
|
* #action
|
|
289
280
|
*/
|
|
@@ -342,7 +333,9 @@ export default function stateModelFactory(pm) {
|
|
|
342
333
|
const schema = pm.pluggableConfigSchemaType('track');
|
|
343
334
|
const conf = resolveIdentifier(schema, getRoot(self), trackId);
|
|
344
335
|
const t = self.tracks.filter(t => t.configuration === conf);
|
|
345
|
-
transaction(() =>
|
|
336
|
+
transaction(() => {
|
|
337
|
+
t.forEach(t => self.tracks.remove(t));
|
|
338
|
+
});
|
|
346
339
|
return t.length;
|
|
347
340
|
},
|
|
348
341
|
/**
|
|
@@ -589,15 +582,21 @@ export default function stateModelFactory(pm) {
|
|
|
589
582
|
},
|
|
590
583
|
{
|
|
591
584
|
label: 'Square view - same bp per pixel',
|
|
592
|
-
onClick: () =>
|
|
585
|
+
onClick: () => {
|
|
586
|
+
self.squareView();
|
|
587
|
+
},
|
|
593
588
|
},
|
|
594
589
|
{
|
|
595
590
|
label: 'Rectangular view - same total bp',
|
|
596
|
-
onClick: () =>
|
|
591
|
+
onClick: () => {
|
|
592
|
+
self.squareView();
|
|
593
|
+
},
|
|
597
594
|
},
|
|
598
595
|
{
|
|
599
596
|
label: 'Show all regions',
|
|
600
|
-
onClick: () =>
|
|
597
|
+
onClick: () => {
|
|
598
|
+
self.showAllRegions();
|
|
599
|
+
},
|
|
601
600
|
},
|
|
602
601
|
{
|
|
603
602
|
label: 'Export SVG',
|
|
@@ -12,7 +12,6 @@ export async function renderToSvg(model, opts) {
|
|
|
12
12
|
var _a;
|
|
13
13
|
await when(() => model.initialized);
|
|
14
14
|
const { themeName = 'default', Wrapper = ({ children }) => children } = opts;
|
|
15
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
16
15
|
const { createRootFn } = getRoot(model);
|
|
17
16
|
const session = getSession(model);
|
|
18
17
|
const theme = (_a = session.allThemes) === null || _a === void 0 ? void 0 : _a.call(session)[themeName];
|
|
@@ -35,7 +34,9 @@ export async function renderToSvg(model, opts) {
|
|
|
35
34
|
React.createElement("defs", null,
|
|
36
35
|
React.createElement("clipPath", { id: "clip-ruler" },
|
|
37
36
|
React.createElement("rect", { x: 0, y: 0, width: viewWidth, height: viewHeight }))),
|
|
38
|
-
React.createElement("g", { clipPath: "url(#clip-ruler)" }, displayResults.map(({ result }, i) => (
|
|
37
|
+
React.createElement("g", { clipPath: "url(#clip-ruler)" }, displayResults.map(({ result }, i) => (
|
|
38
|
+
/* biome-ignore lint/suspicious/noArrayIndexKey: */
|
|
39
|
+
React.createElement("g", { key: i }, result))))),
|
|
39
40
|
React.createElement("g", { transform: `translate(${borderX} ${viewHeight})` },
|
|
40
41
|
React.createElement(HorizontalAxisRaw, { model: model }))))), createRootFn);
|
|
41
42
|
}
|
package/esm/LaunchDotplotView.js
CHANGED
|
@@ -15,7 +15,9 @@ export default function LaunchDotplotView(pluginManager) {
|
|
|
15
15
|
});
|
|
16
16
|
// http://localhost:3000/?config=test_data%2Fvolvox%2Fconfig.json&session=spec-{"views":[{"type":"DotplotView","views":[{"assembly":"volvox"},{"assembly":"volvox"}],"tracks":["volvox_fake_synteny"]}]}
|
|
17
17
|
const idsNotFound = [];
|
|
18
|
-
tracks.forEach(track =>
|
|
18
|
+
tracks.forEach(track => {
|
|
19
|
+
tryTrack(model, track, idsNotFound);
|
|
20
|
+
});
|
|
19
21
|
if (idsNotFound.length) {
|
|
20
22
|
throw new Error(`Could not resolve identifiers: ${idsNotFound.join(',')}`);
|
|
21
23
|
}
|
|
@@ -31,7 +33,7 @@ function tryTrack(model, trackId, idsNotFound) {
|
|
|
31
33
|
model.showTrack(trackId);
|
|
32
34
|
}
|
|
33
35
|
catch (e) {
|
|
34
|
-
if (
|
|
36
|
+
if (/Could not resolve identifier/.exec(`${e}`)) {
|
|
35
37
|
idsNotFound.push(trackId);
|
|
36
38
|
}
|
|
37
39
|
else {
|
|
@@ -28,8 +28,12 @@ function LoadingMessage() {
|
|
|
28
28
|
const [shown, setShown] = useState(false);
|
|
29
29
|
const { classes } = useStyles();
|
|
30
30
|
useEffect(() => {
|
|
31
|
-
const timeout = setTimeout(() =>
|
|
32
|
-
|
|
31
|
+
const timeout = setTimeout(() => {
|
|
32
|
+
setShown(true);
|
|
33
|
+
}, 300);
|
|
34
|
+
return () => {
|
|
35
|
+
clearTimeout(timeout);
|
|
36
|
+
};
|
|
33
37
|
}, []);
|
|
34
38
|
return shown ? (React.createElement("div", { className: classes.loading },
|
|
35
39
|
React.createElement(LoadingEllipses, null))) : null;
|
|
@@ -37,7 +41,7 @@ function LoadingMessage() {
|
|
|
37
41
|
function BlockMessage({ messageText }) {
|
|
38
42
|
const { classes } = useStyles();
|
|
39
43
|
return (React.createElement("div", { className: classes.blockMessage },
|
|
40
|
-
React.createElement(Typography, null,
|
|
44
|
+
React.createElement(Typography, null, messageText)));
|
|
41
45
|
}
|
|
42
46
|
function BlockError({ error }) {
|
|
43
47
|
const { classes } = useStyles();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
/**
|
|
3
|
-
* A block whose content is rendered outside of the main thread and hydrated by
|
|
4
|
-
* component.
|
|
3
|
+
* A block whose content is rendered outside of the main thread and hydrated by
|
|
4
|
+
* this component.
|
|
5
5
|
*/
|
|
6
6
|
interface ModelType {
|
|
7
7
|
imageData: string;
|
|
@@ -14,7 +14,7 @@ const ServerSideSyntenyRendering = observer(function ({ model, }) {
|
|
|
14
14
|
const context = canvas.getContext('2d');
|
|
15
15
|
drawImageOntoCanvasContext(imageData, context);
|
|
16
16
|
setDone(true);
|
|
17
|
-
}, [
|
|
17
|
+
}, [imageData]);
|
|
18
18
|
return (React.createElement("canvas", { "data-testid": `prerendered_canvas${done ? '_done' : ''}`, ref: featureCanvas, width: width * highResolutionScaling, height: height * highResolutionScaling, style: { width, height, ...style } }));
|
|
19
19
|
});
|
|
20
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.14.0",
|
|
4
4
|
"description": "JBrowse 2 dotplot view",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jbrowse",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
],
|
|
25
25
|
"scripts": {
|
|
26
26
|
"build": "npm-run-all build:*",
|
|
27
|
-
"test": "cd ../..; jest plugins/dotplot-view",
|
|
27
|
+
"test": "cd ../..; jest --passWithNoTests plugins/dotplot-view",
|
|
28
28
|
"prepublishOnly": "yarn test",
|
|
29
29
|
"prepack": "yarn build && yarn useDist",
|
|
30
30
|
"postpack": "yarn useSrc",
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"publishConfig": {
|
|
62
62
|
"access": "public"
|
|
63
63
|
},
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "9fb8231d932db40adf0a283081765431756c66ff"
|
|
65
65
|
}
|