@jbrowse/plugin-circular-view 2.12.0 → 2.12.1
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/BaseChordDisplay/models/model.d.ts +12 -13
- package/dist/BaseChordDisplay/models/renderReaction.js +2 -3
- package/dist/CircularView/components/ExportSvgDialog.js +1 -1
- package/dist/CircularView/index.js +1 -1
- package/dist/CircularView/models/slices.js +3 -3
- package/dist/CircularView/models/viewportVisibleRegion.js +3 -4
- package/dist/CircularView/svgcomponents/SVGBackground.js +1 -1
- package/dist/CircularView/svgcomponents/SVGCircularView.js +1 -2
- package/dist/LaunchCircularView/index.js +1 -1
- package/esm/BaseChordDisplay/models/model.d.ts +12 -13
- package/package.json +2 -2
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import CircularChordRendererType from '@jbrowse/core/pluggableElementTypes/renderers/CircularChordRendererType';
|
|
2
3
|
import RendererType from '@jbrowse/core/pluggableElementTypes/renderers/RendererType';
|
|
3
4
|
import { AnyReactComponentType, Feature } from '@jbrowse/core/util';
|
|
4
5
|
import { ExportSvgOptions } from '../../CircularView/models/model';
|
|
@@ -41,8 +42,8 @@ export declare const BaseChordDisplayModel: import("mobx-state-tree").IModelType
|
|
|
41
42
|
error: unknown;
|
|
42
43
|
message: string | undefined;
|
|
43
44
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
44
|
-
onHorizontalScroll?: Function
|
|
45
|
-
blockState?: Record<string, any
|
|
45
|
+
onHorizontalScroll?: Function;
|
|
46
|
+
blockState?: Record<string, any>;
|
|
46
47
|
}>;
|
|
47
48
|
readonly DisplayBlurb: React.FC<{
|
|
48
49
|
model: {
|
|
@@ -53,7 +54,9 @@ export declare const BaseChordDisplayModel: import("mobx-state-tree").IModelType
|
|
|
53
54
|
rendererTypeName: string;
|
|
54
55
|
error: unknown;
|
|
55
56
|
message: string | undefined;
|
|
56
|
-
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree"
|
|
57
|
+
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree" /**
|
|
58
|
+
* #getter
|
|
59
|
+
*/).IModelType<{
|
|
57
60
|
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
58
61
|
type: import("mobx-state-tree").ISimpleType<string>;
|
|
59
62
|
rpcDriverName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
@@ -66,27 +69,23 @@ export declare const BaseChordDisplayModel: import("mobx-state-tree").IModelType
|
|
|
66
69
|
readonly adapterConfig: any;
|
|
67
70
|
readonly parentTrack: any;
|
|
68
71
|
renderProps(): any;
|
|
69
|
-
readonly rendererType: RendererType;
|
|
70
|
-
readonly DisplayMessageComponent: React.FC<any
|
|
72
|
+
readonly rendererType: import("@jbrowse/core/pluggableElementTypes").RendererType;
|
|
73
|
+
readonly DisplayMessageComponent: undefined | React.FC<any>;
|
|
71
74
|
trackMenuItems(): import("@jbrowse/core/ui").MenuItem[];
|
|
72
75
|
readonly viewMenuActions: import("@jbrowse/core/ui").MenuItem[];
|
|
73
76
|
regionCannotBeRendered(): null;
|
|
74
77
|
} & {
|
|
75
|
-
setMessage(arg?: string
|
|
76
|
-
* #getter
|
|
77
|
-
* returns a string feature ID if the globally-selected object
|
|
78
|
-
* is probably a feature
|
|
79
|
-
*/
|
|
78
|
+
setMessage(arg?: string): void;
|
|
80
79
|
setError(error?: unknown): void;
|
|
81
80
|
setRpcDriverName(rpcDriverName: string): void;
|
|
82
81
|
reload(): void;
|
|
83
82
|
} & {
|
|
84
83
|
filled: boolean;
|
|
85
|
-
reactElement: React.ReactElement
|
|
84
|
+
reactElement: React.ReactElement | undefined;
|
|
86
85
|
data: undefined;
|
|
87
86
|
html: string | undefined;
|
|
88
87
|
message: string;
|
|
89
|
-
renderingComponent:
|
|
88
|
+
renderingComponent: undefined | AnyReactComponentType;
|
|
90
89
|
refNameMap: Record<string, string> | undefined;
|
|
91
90
|
} & {
|
|
92
91
|
/**
|
|
@@ -111,7 +110,7 @@ export declare const BaseChordDisplayModel: import("mobx-state-tree").IModelType
|
|
|
111
110
|
/**
|
|
112
111
|
* #method
|
|
113
112
|
*/
|
|
114
|
-
isCompatibleWithRenderer(renderer: RendererType):
|
|
113
|
+
isCompatibleWithRenderer(renderer: RendererType): renderer is CircularChordRendererType;
|
|
115
114
|
/**
|
|
116
115
|
* #getter
|
|
117
116
|
* returns a string feature ID if the globally-selected object
|
|
@@ -3,7 +3,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
6
|
+
exports.renderReactionData = renderReactionData;
|
|
7
|
+
exports.renderReactionEffect = renderReactionEffect;
|
|
7
8
|
const clone_1 = __importDefault(require("clone"));
|
|
8
9
|
const tracks_1 = require("@jbrowse/core/util/tracks");
|
|
9
10
|
const util_1 = require("@jbrowse/core/util");
|
|
@@ -28,7 +29,6 @@ function renderReactionData(self) {
|
|
|
28
29
|
},
|
|
29
30
|
};
|
|
30
31
|
}
|
|
31
|
-
exports.renderReactionData = renderReactionData;
|
|
32
32
|
async function renderReactionEffect(
|
|
33
33
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
34
34
|
props, signal,
|
|
@@ -62,4 +62,3 @@ self) {
|
|
|
62
62
|
renderingComponent: rendererType.ReactComponent,
|
|
63
63
|
};
|
|
64
64
|
}
|
|
65
|
-
exports.renderReactionEffect = renderReactionEffect;
|
|
@@ -23,6 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.default = ExportSvgDialog;
|
|
26
27
|
const react_1 = __importStar(require("react"));
|
|
27
28
|
const material_1 = require("@mui/material");
|
|
28
29
|
const ui_1 = require("@jbrowse/core/ui");
|
|
@@ -77,4 +78,3 @@ function ExportSvgDialog({ model, handleClose, }) {
|
|
|
77
78
|
}
|
|
78
79
|
} }, "Submit"))));
|
|
79
80
|
}
|
|
80
|
-
exports.default = ExportSvgDialog;
|
|
@@ -26,6 +26,7 @@ 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
|
+
exports.default = CircularViewF;
|
|
29
30
|
const react_1 = require("react");
|
|
30
31
|
const ViewType_1 = __importDefault(require("@jbrowse/core/pluggableElementTypes/ViewType"));
|
|
31
32
|
const model_1 = __importDefault(require("./models/model"));
|
|
@@ -37,4 +38,3 @@ function CircularViewF(pluginManager) {
|
|
|
37
38
|
displayName: 'Circular view',
|
|
38
39
|
}));
|
|
39
40
|
}
|
|
40
|
-
exports.default = CircularViewF;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.Slice = void 0;
|
|
4
|
+
exports.calculateStaticSlices = calculateStaticSlices;
|
|
5
|
+
exports.sliceIsVisible = sliceIsVisible;
|
|
4
6
|
const util_1 = require("@jbrowse/core/util");
|
|
5
7
|
const viewportVisibleRegion_1 = require("./viewportVisibleRegion");
|
|
6
8
|
class Slice {
|
|
@@ -49,9 +51,7 @@ function calculateStaticSlices(self) {
|
|
|
49
51
|
}
|
|
50
52
|
return slices;
|
|
51
53
|
}
|
|
52
|
-
exports.calculateStaticSlices = calculateStaticSlices;
|
|
53
54
|
function sliceIsVisible(self, slice) {
|
|
54
55
|
const { theta: [visibleThetaMin, visibleThetaMax], } = self.visibleSection;
|
|
55
56
|
return (0, viewportVisibleRegion_1.thetaRangesOverlap)(slice.offsetRadians + self.offsetRadians, slice.radianWidth, visibleThetaMin, visibleThetaMax - visibleThetaMin);
|
|
56
57
|
}
|
|
57
|
-
exports.sliceIsVisible = sliceIsVisible;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.cartesianToPolar = cartesianToPolar;
|
|
4
|
+
exports.thetaRangesOverlap = thetaRangesOverlap;
|
|
5
|
+
exports.viewportVisibleSection = viewportVisibleSection;
|
|
4
6
|
function findCircleIntersectionX(y, cx, cy, r, resultArray) {
|
|
5
7
|
const d = Math.abs(y - cy);
|
|
6
8
|
if (d > r) {
|
|
@@ -43,7 +45,6 @@ function cartesianToPolar(x, y) {
|
|
|
43
45
|
const theta = cartesianToTheta(x, y);
|
|
44
46
|
return [rho, theta];
|
|
45
47
|
}
|
|
46
|
-
exports.cartesianToPolar = cartesianToPolar;
|
|
47
48
|
const twoPi = 2 * Math.PI;
|
|
48
49
|
function thetaRangesOverlap(r1start, r1length, r2start, r2length) {
|
|
49
50
|
if (r1length <= 0 || r2length <= 0) {
|
|
@@ -67,7 +68,6 @@ function thetaRangesOverlap(r1start, r1length, r2start, r2length) {
|
|
|
67
68
|
r2start += twoPi + twoPi;
|
|
68
69
|
return r1start < r2start + r2length && r1start + r1length > r2start;
|
|
69
70
|
}
|
|
70
|
-
exports.thetaRangesOverlap = thetaRangesOverlap;
|
|
71
71
|
// return which arc range has any part of the circle visible in the viewport
|
|
72
72
|
function viewportVisibleSection(viewSides, circleCenter, circleRadius) {
|
|
73
73
|
let [viewL, viewR, viewT, viewB] = viewSides;
|
|
@@ -221,4 +221,3 @@ function viewportVisibleSection(viewSides, circleCenter, circleRadius) {
|
|
|
221
221
|
theta: [thetaMin, thetaMax],
|
|
222
222
|
};
|
|
223
223
|
}
|
|
224
|
-
exports.viewportVisibleSection = viewportVisibleSection;
|
|
@@ -3,6 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.default = SVGBackground;
|
|
6
7
|
const react_1 = __importDefault(require("react"));
|
|
7
8
|
const material_1 = require("@mui/material");
|
|
8
9
|
const util_1 = require("@jbrowse/core/util");
|
|
@@ -10,4 +11,3 @@ function SVGBackground({ width, height, shift, }) {
|
|
|
10
11
|
const theme = (0, material_1.useTheme)();
|
|
11
12
|
return (react_1.default.createElement("rect", { width: width + shift * 2, height: height, fill: (0, util_1.stripAlpha)(theme.palette.background.default) }));
|
|
12
13
|
}
|
|
13
|
-
exports.default = SVGBackground;
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.renderToSvg =
|
|
6
|
+
exports.renderToSvg = renderToSvg;
|
|
7
7
|
const react_1 = __importDefault(require("react"));
|
|
8
8
|
const material_1 = require("@mui/material");
|
|
9
9
|
const mobx_1 = require("mobx");
|
|
@@ -38,4 +38,3 @@ async function renderToSvg(model, opts) {
|
|
|
38
38
|
staticSlices.map((slice, i) => (react_1.default.createElement(Ruler_1.default, { key: i, model: model, slice: slice }))),
|
|
39
39
|
displayResults.map(({ result }, i) => (react_1.default.createElement(react_1.default.Fragment, { key: i }, result))))))), createRootFn);
|
|
40
40
|
}
|
|
41
|
-
exports.renderToSvg = renderToSvg;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = LaunchCircularViewF;
|
|
3
4
|
const mobx_1 = require("mobx");
|
|
4
5
|
function LaunchCircularViewF(pluginManager) {
|
|
5
6
|
pluginManager.addToExtensionPoint('LaunchView-CircularView',
|
|
@@ -19,4 +20,3 @@ function LaunchCircularViewF(pluginManager) {
|
|
|
19
20
|
tracks.forEach(track => view.showTrack(track));
|
|
20
21
|
});
|
|
21
22
|
}
|
|
22
|
-
exports.default = LaunchCircularViewF;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import CircularChordRendererType from '@jbrowse/core/pluggableElementTypes/renderers/CircularChordRendererType';
|
|
2
3
|
import RendererType from '@jbrowse/core/pluggableElementTypes/renderers/RendererType';
|
|
3
4
|
import { AnyReactComponentType, Feature } from '@jbrowse/core/util';
|
|
4
5
|
import { ExportSvgOptions } from '../../CircularView/models/model';
|
|
@@ -41,8 +42,8 @@ export declare const BaseChordDisplayModel: import("mobx-state-tree").IModelType
|
|
|
41
42
|
error: unknown;
|
|
42
43
|
message: string | undefined;
|
|
43
44
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
44
|
-
onHorizontalScroll?: Function
|
|
45
|
-
blockState?: Record<string, any
|
|
45
|
+
onHorizontalScroll?: Function;
|
|
46
|
+
blockState?: Record<string, any>;
|
|
46
47
|
}>;
|
|
47
48
|
readonly DisplayBlurb: React.FC<{
|
|
48
49
|
model: {
|
|
@@ -53,7 +54,9 @@ export declare const BaseChordDisplayModel: import("mobx-state-tree").IModelType
|
|
|
53
54
|
rendererTypeName: string;
|
|
54
55
|
error: unknown;
|
|
55
56
|
message: string | undefined;
|
|
56
|
-
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree"
|
|
57
|
+
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree" /**
|
|
58
|
+
* #getter
|
|
59
|
+
*/).IModelType<{
|
|
57
60
|
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
58
61
|
type: import("mobx-state-tree").ISimpleType<string>;
|
|
59
62
|
rpcDriverName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
@@ -66,27 +69,23 @@ export declare const BaseChordDisplayModel: import("mobx-state-tree").IModelType
|
|
|
66
69
|
readonly adapterConfig: any;
|
|
67
70
|
readonly parentTrack: any;
|
|
68
71
|
renderProps(): any;
|
|
69
|
-
readonly rendererType: RendererType;
|
|
70
|
-
readonly DisplayMessageComponent: React.FC<any
|
|
72
|
+
readonly rendererType: import("@jbrowse/core/pluggableElementTypes").RendererType;
|
|
73
|
+
readonly DisplayMessageComponent: undefined | React.FC<any>;
|
|
71
74
|
trackMenuItems(): import("@jbrowse/core/ui").MenuItem[];
|
|
72
75
|
readonly viewMenuActions: import("@jbrowse/core/ui").MenuItem[];
|
|
73
76
|
regionCannotBeRendered(): null;
|
|
74
77
|
} & {
|
|
75
|
-
setMessage(arg?: string
|
|
76
|
-
* #getter
|
|
77
|
-
* returns a string feature ID if the globally-selected object
|
|
78
|
-
* is probably a feature
|
|
79
|
-
*/
|
|
78
|
+
setMessage(arg?: string): void;
|
|
80
79
|
setError(error?: unknown): void;
|
|
81
80
|
setRpcDriverName(rpcDriverName: string): void;
|
|
82
81
|
reload(): void;
|
|
83
82
|
} & {
|
|
84
83
|
filled: boolean;
|
|
85
|
-
reactElement: React.ReactElement
|
|
84
|
+
reactElement: React.ReactElement | undefined;
|
|
86
85
|
data: undefined;
|
|
87
86
|
html: string | undefined;
|
|
88
87
|
message: string;
|
|
89
|
-
renderingComponent:
|
|
88
|
+
renderingComponent: undefined | AnyReactComponentType;
|
|
90
89
|
refNameMap: Record<string, string> | undefined;
|
|
91
90
|
} & {
|
|
92
91
|
/**
|
|
@@ -111,7 +110,7 @@ export declare const BaseChordDisplayModel: import("mobx-state-tree").IModelType
|
|
|
111
110
|
/**
|
|
112
111
|
* #method
|
|
113
112
|
*/
|
|
114
|
-
isCompatibleWithRenderer(renderer: RendererType):
|
|
113
|
+
isCompatibleWithRenderer(renderer: RendererType): renderer is CircularChordRendererType;
|
|
115
114
|
/**
|
|
116
115
|
* #getter
|
|
117
116
|
* returns a string feature ID if the globally-selected object
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jbrowse/plugin-circular-view",
|
|
3
|
-
"version": "2.12.
|
|
3
|
+
"version": "2.12.1",
|
|
4
4
|
"description": "JBrowse 2 circular view",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jbrowse",
|
|
@@ -57,5 +57,5 @@
|
|
|
57
57
|
"distModule": "esm/index.js",
|
|
58
58
|
"srcModule": "src/index.ts",
|
|
59
59
|
"module": "esm/index.js",
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "20f16ae5a56ae5e4806aaa373131e540b0b5b0fd"
|
|
61
61
|
}
|