@jbrowse/plugin-lollipop 2.18.0 → 3.0.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/LinearLollipopDisplay/model.d.ts +6 -6
- package/dist/LollipopRenderer/LollipopRenderer.js +17 -7
- package/dist/LollipopRenderer/components/Lollipop.d.ts +1 -2
- package/dist/LollipopRenderer/components/Lollipop.js +2 -6
- package/dist/LollipopRenderer/components/LollipopRendering.d.ts +1 -2
- package/dist/LollipopRenderer/components/LollipopRendering.js +6 -7
- package/dist/LollipopRenderer/components/ScoreText.d.ts +1 -2
- package/dist/LollipopRenderer/components/ScoreText.js +2 -5
- package/dist/LollipopRenderer/components/Stick.d.ts +1 -2
- package/dist/LollipopRenderer/components/Stick.js +2 -5
- package/dist/LollipopRenderer/index.js +17 -7
- package/esm/LinearLollipopDisplay/model.d.ts +6 -6
- package/esm/LollipopRenderer/components/Lollipop.d.ts +1 -2
- package/esm/LollipopRenderer/components/Lollipop.js +2 -6
- package/esm/LollipopRenderer/components/LollipopRendering.d.ts +1 -2
- package/esm/LollipopRenderer/components/LollipopRendering.js +6 -7
- package/esm/LollipopRenderer/components/ScoreText.d.ts +1 -2
- package/esm/LollipopRenderer/components/ScoreText.js +2 -2
- package/esm/LollipopRenderer/components/Stick.d.ts +1 -2
- package/esm/LollipopRenderer/components/Stick.js +2 -2
- package/package.json +2 -2
|
@@ -34,7 +34,7 @@ export declare function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
34
34
|
status?: string;
|
|
35
35
|
reactElement?: React.ReactElement;
|
|
36
36
|
};
|
|
37
|
-
}) =>
|
|
37
|
+
}) => import("react/jsx-runtime").JSX.Element | undefined;
|
|
38
38
|
renderProps: any;
|
|
39
39
|
} & {
|
|
40
40
|
doReload(): void;
|
|
@@ -169,13 +169,13 @@ export declare function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
169
169
|
} & {
|
|
170
170
|
readonly statsReadyAndRegionNotTooLarge: boolean;
|
|
171
171
|
regionCannotBeRenderedText(_region: import("@jbrowse/core/util").Region): "" | "Force load to see features";
|
|
172
|
-
regionCannotBeRendered(_region: import("@jbrowse/core/util").Region):
|
|
172
|
+
regionCannotBeRendered(_region: import("@jbrowse/core/util").Region): import("react/jsx-runtime").JSX.Element | null;
|
|
173
173
|
} & {
|
|
174
174
|
featureIdUnderMouse: undefined | string;
|
|
175
175
|
contextMenuFeature: undefined | import("@jbrowse/core/util").Feature;
|
|
176
176
|
} & {
|
|
177
|
-
readonly DisplayMessageComponent: React.FC<any
|
|
178
|
-
readonly blockType: "
|
|
177
|
+
readonly DisplayMessageComponent: undefined | React.FC<any>;
|
|
178
|
+
readonly blockType: "staticBlocks" | "dynamicBlocks";
|
|
179
179
|
readonly blockDefinitions: import("@jbrowse/core/util/blockTypes").BlockSet;
|
|
180
180
|
} & {
|
|
181
181
|
readonly renderDelay: number;
|
|
@@ -202,7 +202,7 @@ export declare function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
202
202
|
contextMenuItems(): import("@jbrowse/core/ui").MenuItem[];
|
|
203
203
|
renderProps(): any;
|
|
204
204
|
} & {
|
|
205
|
-
renderSvg(opts: import("@jbrowse/plugin-linear-genome-view").ExportSvgDisplayOptions): Promise<
|
|
205
|
+
renderSvg(opts: import("@jbrowse/plugin-linear-genome-view").ExportSvgDisplayOptions): Promise<import("react/jsx-runtime").JSX.Element>;
|
|
206
206
|
afterAttach(): void;
|
|
207
207
|
} & {
|
|
208
208
|
readonly blockType: string;
|
|
@@ -246,7 +246,7 @@ export declare function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
246
246
|
status?: string;
|
|
247
247
|
reactElement?: React.ReactElement;
|
|
248
248
|
};
|
|
249
|
-
}) =>
|
|
249
|
+
}) => import("react/jsx-runtime").JSX.Element | undefined;
|
|
250
250
|
renderProps: any;
|
|
251
251
|
} & {
|
|
252
252
|
doReload(): void;
|
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
37
|
};
|
|
@@ -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
|
-
const
|
|
6
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
7
|
const configuration_1 = require("@jbrowse/core/configuration");
|
|
8
8
|
const mobx_react_1 = require("mobx-react");
|
|
9
9
|
const ScoreText_1 = __importDefault(require("./ScoreText"));
|
|
@@ -53,10 +53,6 @@ const Lollipop = (0, mobx_react_1.observer)(function Lollipop(props) {
|
|
|
53
53
|
fill: (0, configuration_1.readConfObject)(config, 'innerColor', { feature }),
|
|
54
54
|
};
|
|
55
55
|
const strokeWidth = (0, configuration_1.readConfObject)(config, 'strokeWidth', { feature });
|
|
56
|
-
return (
|
|
57
|
-
react_1.default.createElement("title", null, (0, configuration_1.readConfObject)(config, 'caption', { feature })),
|
|
58
|
-
react_1.default.createElement("circle", { cx: anchorLocation, cy: y + radiusPx, r: radiusPx, style: styleOuter, onMouseDown: onFeatureMouseDown, onMouseEnter: onFeatureMouseEnter, onMouseOut: onFeatureMouseOut, onMouseOver: onFeatureMouseOver, onMouseUp: onFeatureMouseUp, onMouseLeave: onFeatureMouseLeave, onMouseMove: onFeatureMouseMove, onClick: onFeatureClick, onFocus: onFeatureMouseOver, onBlur: onFeatureMouseOut }),
|
|
59
|
-
radiusPx - strokeWidth <= 2 ? null : (react_1.default.createElement("circle", { cx: anchorLocation, cy: y + radiusPx, r: radiusPx - strokeWidth, style: styleInner, onMouseDown: onFeatureMouseDown, onMouseEnter: onFeatureMouseEnter, onMouseOut: onFeatureMouseOut, onMouseOver: onFeatureMouseOver, onMouseUp: onFeatureMouseUp, onMouseLeave: onFeatureMouseLeave, onMouseMove: onFeatureMouseMove, onClick: onFeatureClick, onFocus: onFeatureMouseOver, onBlur: onFeatureMouseOut })),
|
|
60
|
-
react_1.default.createElement(ScoreText_1.default, { feature: feature, config: config, layoutRecord: layoutRecord })));
|
|
56
|
+
return ((0, jsx_runtime_1.jsxs)("g", { "data-testid": feature.id(), children: [(0, jsx_runtime_1.jsx)("title", { children: (0, configuration_1.readConfObject)(config, 'caption', { feature }) }), (0, jsx_runtime_1.jsx)("circle", { cx: anchorLocation, cy: y + radiusPx, r: radiusPx, style: styleOuter, onMouseDown: onFeatureMouseDown, onMouseEnter: onFeatureMouseEnter, onMouseOut: onFeatureMouseOut, onMouseOver: onFeatureMouseOver, onMouseUp: onFeatureMouseUp, onMouseLeave: onFeatureMouseLeave, onMouseMove: onFeatureMouseMove, onClick: onFeatureClick, onFocus: onFeatureMouseOver, onBlur: onFeatureMouseOut }), radiusPx - strokeWidth <= 2 ? null : ((0, jsx_runtime_1.jsx)("circle", { cx: anchorLocation, cy: y + radiusPx, r: radiusPx - strokeWidth, style: styleInner, onMouseDown: onFeatureMouseDown, onMouseEnter: onFeatureMouseEnter, onMouseOut: onFeatureMouseOut, onMouseOver: onFeatureMouseOver, onMouseUp: onFeatureMouseUp, onMouseLeave: onFeatureMouseLeave, onMouseMove: onFeatureMouseMove, onClick: onFeatureClick, onFocus: onFeatureMouseOver, onBlur: onFeatureMouseOut })), (0, jsx_runtime_1.jsx)(ScoreText_1.default, { feature: feature, config: config, layoutRecord: layoutRecord })] }));
|
|
61
57
|
});
|
|
62
58
|
exports.default = Lollipop;
|
|
@@ -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
|
-
const
|
|
6
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
+
const react_1 = require("react");
|
|
7
8
|
const configuration_1 = require("@jbrowse/core/configuration");
|
|
8
9
|
const util_1 = require("@jbrowse/core/util");
|
|
9
10
|
const mobx_react_1 = require("mobx-react");
|
|
@@ -68,11 +69,9 @@ const LollipopRendering = (0, mobx_react_1.observer)(function (props) {
|
|
|
68
69
|
const width = (region.end - region.start) / bpPerPx;
|
|
69
70
|
const records = [...layout.getLayout(config).values()];
|
|
70
71
|
const height = layout.getTotalHeight();
|
|
71
|
-
return (
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
react_1.default.createElement(Lollipop_1.default, { key: `body-${feature.id()}`, ...props, layoutRecord: layoutRecord, feature: feature, selectedFeatureId: selectedFeatureId })));
|
|
76
|
-
})));
|
|
72
|
+
return ((0, jsx_runtime_1.jsx)("svg", { width: width, height: height, style: { position: 'relative' }, onMouseDown: onMouseDown, onMouseUp: onMouseUp, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, onMouseOver: onMouseOver, onMouseOut: onMouseOut, onFocus: onMouseEnter, onBlur: onMouseLeave, onClick: onClick, children: records.map(layoutRecord => {
|
|
73
|
+
const feature = features.get(layoutRecord.data.featureId);
|
|
74
|
+
return ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Stick_1.default, { ...props, config: config, layoutRecord: layoutRecord, feature: feature }, `stick-${feature.id()}`), (0, jsx_runtime_1.jsx)(Lollipop_1.default, { ...props, layoutRecord: layoutRecord, feature: feature, selectedFeatureId: selectedFeatureId }, `body-${feature.id()}`)] }, feature.id()));
|
|
75
|
+
}) }));
|
|
77
76
|
});
|
|
78
77
|
exports.default = LollipopRendering;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
|
|
3
2
|
import type { Feature } from '@jbrowse/core/util';
|
|
4
3
|
export default function ScoreText({ feature, config, layoutRecord: { y, data: { anchorX, radiusPx, score }, }, }: {
|
|
@@ -12,4 +11,4 @@ export default function ScoreText({ feature, config, layoutRecord: { y, data: {
|
|
|
12
11
|
score: number;
|
|
13
12
|
};
|
|
14
13
|
};
|
|
15
|
-
}):
|
|
14
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.default = ScoreText;
|
|
7
|
-
const
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
5
|
const configuration_1 = require("@jbrowse/core/configuration");
|
|
9
6
|
const color_1 = require("@jbrowse/core/util/color");
|
|
10
7
|
function ScoreText({ feature, config, layoutRecord: { y, data: { anchorX, radiusPx, score }, }, }) {
|
|
@@ -15,5 +12,5 @@ function ScoreText({ feature, config, layoutRecord: { y, data: { anchorX, radius
|
|
|
15
12
|
if (fontHeight < 12) {
|
|
16
13
|
return null;
|
|
17
14
|
}
|
|
18
|
-
return (
|
|
15
|
+
return ((0, jsx_runtime_1.jsx)("text", { style: { fontSize: fontHeight, fill: (0, color_1.contrastingTextColor)(innerColor) }, x: anchorX, y: y + radiusPx - fontHeight / 2.4, textAnchor: "middle", dominantBaseline: "hanging", children: scoreString }));
|
|
19
16
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
|
|
3
2
|
import type { Feature } from '@jbrowse/core/util';
|
|
4
3
|
declare const Stick: ({ feature, config, layoutRecord: { anchorLocation, y, data: { radiusPx }, }, }: {
|
|
@@ -11,5 +10,5 @@ declare const Stick: ({ feature, config, layoutRecord: { anchorLocation, y, data
|
|
|
11
10
|
radiusPx: number;
|
|
12
11
|
};
|
|
13
12
|
};
|
|
14
|
-
}) =>
|
|
13
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
15
14
|
export default Stick;
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const
|
|
3
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
4
|
const configuration_1 = require("@jbrowse/core/configuration");
|
|
8
5
|
const mobx_react_1 = require("mobx-react");
|
|
9
6
|
const Stick = (0, mobx_react_1.observer)(function Stick({ feature, config, layoutRecord: { anchorLocation, y, data: { radiusPx }, }, }) {
|
|
10
|
-
return (
|
|
7
|
+
return ((0, jsx_runtime_1.jsx)("line", { x1: anchorLocation, y1: 0, x2: anchorLocation, y2: y + 2 * radiusPx, stroke: (0, configuration_1.readConfObject)(config, 'stickColor', { feature }), strokeWidth: (0, configuration_1.readConfObject)(config, 'stickWidth', { feature }) }));
|
|
11
8
|
});
|
|
12
9
|
exports.default = Stick;
|
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
37
|
};
|
|
@@ -34,7 +34,7 @@ export declare function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
34
34
|
status?: string;
|
|
35
35
|
reactElement?: React.ReactElement;
|
|
36
36
|
};
|
|
37
|
-
}) =>
|
|
37
|
+
}) => import("react/jsx-runtime").JSX.Element | undefined;
|
|
38
38
|
renderProps: any;
|
|
39
39
|
} & {
|
|
40
40
|
doReload(): void;
|
|
@@ -169,13 +169,13 @@ export declare function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
169
169
|
} & {
|
|
170
170
|
readonly statsReadyAndRegionNotTooLarge: boolean;
|
|
171
171
|
regionCannotBeRenderedText(_region: import("@jbrowse/core/util").Region): "" | "Force load to see features";
|
|
172
|
-
regionCannotBeRendered(_region: import("@jbrowse/core/util").Region):
|
|
172
|
+
regionCannotBeRendered(_region: import("@jbrowse/core/util").Region): import("react/jsx-runtime").JSX.Element | null;
|
|
173
173
|
} & {
|
|
174
174
|
featureIdUnderMouse: undefined | string;
|
|
175
175
|
contextMenuFeature: undefined | import("@jbrowse/core/util").Feature;
|
|
176
176
|
} & {
|
|
177
|
-
readonly DisplayMessageComponent: React.FC<any
|
|
178
|
-
readonly blockType: "
|
|
177
|
+
readonly DisplayMessageComponent: undefined | React.FC<any>;
|
|
178
|
+
readonly blockType: "staticBlocks" | "dynamicBlocks";
|
|
179
179
|
readonly blockDefinitions: import("@jbrowse/core/util/blockTypes").BlockSet;
|
|
180
180
|
} & {
|
|
181
181
|
readonly renderDelay: number;
|
|
@@ -202,7 +202,7 @@ export declare function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
202
202
|
contextMenuItems(): import("@jbrowse/core/ui").MenuItem[];
|
|
203
203
|
renderProps(): any;
|
|
204
204
|
} & {
|
|
205
|
-
renderSvg(opts: import("@jbrowse/plugin-linear-genome-view").ExportSvgDisplayOptions): Promise<
|
|
205
|
+
renderSvg(opts: import("@jbrowse/plugin-linear-genome-view").ExportSvgDisplayOptions): Promise<import("react/jsx-runtime").JSX.Element>;
|
|
206
206
|
afterAttach(): void;
|
|
207
207
|
} & {
|
|
208
208
|
readonly blockType: string;
|
|
@@ -246,7 +246,7 @@ export declare function stateModelFactory(configSchema: AnyConfigurationSchemaTy
|
|
|
246
246
|
status?: string;
|
|
247
247
|
reactElement?: React.ReactElement;
|
|
248
248
|
};
|
|
249
|
-
}) =>
|
|
249
|
+
}) => import("react/jsx-runtime").JSX.Element | undefined;
|
|
250
250
|
renderProps: any;
|
|
251
251
|
} & {
|
|
252
252
|
doReload(): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { readConfObject } from '@jbrowse/core/configuration';
|
|
3
3
|
import { observer } from 'mobx-react';
|
|
4
4
|
import ScoreText from './ScoreText';
|
|
@@ -48,10 +48,6 @@ const Lollipop = observer(function Lollipop(props) {
|
|
|
48
48
|
fill: readConfObject(config, 'innerColor', { feature }),
|
|
49
49
|
};
|
|
50
50
|
const strokeWidth = readConfObject(config, 'strokeWidth', { feature });
|
|
51
|
-
return (
|
|
52
|
-
React.createElement("title", null, readConfObject(config, 'caption', { feature })),
|
|
53
|
-
React.createElement("circle", { cx: anchorLocation, cy: y + radiusPx, r: radiusPx, style: styleOuter, onMouseDown: onFeatureMouseDown, onMouseEnter: onFeatureMouseEnter, onMouseOut: onFeatureMouseOut, onMouseOver: onFeatureMouseOver, onMouseUp: onFeatureMouseUp, onMouseLeave: onFeatureMouseLeave, onMouseMove: onFeatureMouseMove, onClick: onFeatureClick, onFocus: onFeatureMouseOver, onBlur: onFeatureMouseOut }),
|
|
54
|
-
radiusPx - strokeWidth <= 2 ? null : (React.createElement("circle", { cx: anchorLocation, cy: y + radiusPx, r: radiusPx - strokeWidth, style: styleInner, onMouseDown: onFeatureMouseDown, onMouseEnter: onFeatureMouseEnter, onMouseOut: onFeatureMouseOut, onMouseOver: onFeatureMouseOver, onMouseUp: onFeatureMouseUp, onMouseLeave: onFeatureMouseLeave, onMouseMove: onFeatureMouseMove, onClick: onFeatureClick, onFocus: onFeatureMouseOver, onBlur: onFeatureMouseOut })),
|
|
55
|
-
React.createElement(ScoreText, { feature: feature, config: config, layoutRecord: layoutRecord })));
|
|
51
|
+
return (_jsxs("g", { "data-testid": feature.id(), children: [_jsx("title", { children: readConfObject(config, 'caption', { feature }) }), _jsx("circle", { cx: anchorLocation, cy: y + radiusPx, r: radiusPx, style: styleOuter, onMouseDown: onFeatureMouseDown, onMouseEnter: onFeatureMouseEnter, onMouseOut: onFeatureMouseOut, onMouseOver: onFeatureMouseOver, onMouseUp: onFeatureMouseUp, onMouseLeave: onFeatureMouseLeave, onMouseMove: onFeatureMouseMove, onClick: onFeatureClick, onFocus: onFeatureMouseOver, onBlur: onFeatureMouseOut }), radiusPx - strokeWidth <= 2 ? null : (_jsx("circle", { cx: anchorLocation, cy: y + radiusPx, r: radiusPx - strokeWidth, style: styleInner, onMouseDown: onFeatureMouseDown, onMouseEnter: onFeatureMouseEnter, onMouseOut: onFeatureMouseOut, onMouseOver: onFeatureMouseOver, onMouseUp: onFeatureMouseUp, onMouseLeave: onFeatureMouseLeave, onMouseMove: onFeatureMouseMove, onClick: onFeatureClick, onFocus: onFeatureMouseOver, onBlur: onFeatureMouseOut })), _jsx(ScoreText, { feature: feature, config: config, layoutRecord: layoutRecord })] }));
|
|
56
52
|
});
|
|
57
53
|
export default Lollipop;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Fragment } from 'react';
|
|
2
3
|
import { readConfObject } from '@jbrowse/core/configuration';
|
|
3
4
|
import { bpToPx } from '@jbrowse/core/util';
|
|
4
5
|
import { observer } from 'mobx-react';
|
|
@@ -63,11 +64,9 @@ const LollipopRendering = observer(function (props) {
|
|
|
63
64
|
const width = (region.end - region.start) / bpPerPx;
|
|
64
65
|
const records = [...layout.getLayout(config).values()];
|
|
65
66
|
const height = layout.getTotalHeight();
|
|
66
|
-
return (
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
React.createElement(Lollipop, { key: `body-${feature.id()}`, ...props, layoutRecord: layoutRecord, feature: feature, selectedFeatureId: selectedFeatureId })));
|
|
71
|
-
})));
|
|
67
|
+
return (_jsx("svg", { width: width, height: height, style: { position: 'relative' }, onMouseDown: onMouseDown, onMouseUp: onMouseUp, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, onMouseOver: onMouseOver, onMouseOut: onMouseOut, onFocus: onMouseEnter, onBlur: onMouseLeave, onClick: onClick, children: records.map(layoutRecord => {
|
|
68
|
+
const feature = features.get(layoutRecord.data.featureId);
|
|
69
|
+
return (_jsxs(Fragment, { children: [_jsx(Stick, { ...props, config: config, layoutRecord: layoutRecord, feature: feature }, `stick-${feature.id()}`), _jsx(Lollipop, { ...props, layoutRecord: layoutRecord, feature: feature, selectedFeatureId: selectedFeatureId }, `body-${feature.id()}`)] }, feature.id()));
|
|
70
|
+
}) }));
|
|
72
71
|
});
|
|
73
72
|
export default LollipopRendering;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
|
|
3
2
|
import type { Feature } from '@jbrowse/core/util';
|
|
4
3
|
export default function ScoreText({ feature, config, layoutRecord: { y, data: { anchorX, radiusPx, score }, }, }: {
|
|
@@ -12,4 +11,4 @@ export default function ScoreText({ feature, config, layoutRecord: { y, data: {
|
|
|
12
11
|
score: number;
|
|
13
12
|
};
|
|
14
13
|
};
|
|
15
|
-
}):
|
|
14
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { readConfObject } from '@jbrowse/core/configuration';
|
|
3
3
|
import { contrastingTextColor } from '@jbrowse/core/util/color';
|
|
4
4
|
export default function ScoreText({ feature, config, layoutRecord: { y, data: { anchorX, radiusPx, score }, }, }) {
|
|
@@ -9,5 +9,5 @@ export default function ScoreText({ feature, config, layoutRecord: { y, data: {
|
|
|
9
9
|
if (fontHeight < 12) {
|
|
10
10
|
return null;
|
|
11
11
|
}
|
|
12
|
-
return (
|
|
12
|
+
return (_jsx("text", { style: { fontSize: fontHeight, fill: contrastingTextColor(innerColor) }, x: anchorX, y: y + radiusPx - fontHeight / 2.4, textAnchor: "middle", dominantBaseline: "hanging", children: scoreString }));
|
|
13
13
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
|
|
3
2
|
import type { Feature } from '@jbrowse/core/util';
|
|
4
3
|
declare const Stick: ({ feature, config, layoutRecord: { anchorLocation, y, data: { radiusPx }, }, }: {
|
|
@@ -11,5 +10,5 @@ declare const Stick: ({ feature, config, layoutRecord: { anchorLocation, y, data
|
|
|
11
10
|
radiusPx: number;
|
|
12
11
|
};
|
|
13
12
|
};
|
|
14
|
-
}) =>
|
|
13
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
15
14
|
export default Stick;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { readConfObject } from '@jbrowse/core/configuration';
|
|
3
3
|
import { observer } from 'mobx-react';
|
|
4
4
|
const Stick = observer(function Stick({ feature, config, layoutRecord: { anchorLocation, y, data: { radiusPx }, }, }) {
|
|
5
|
-
return (
|
|
5
|
+
return (_jsx("line", { x1: anchorLocation, y1: 0, x2: anchorLocation, y2: y + 2 * radiusPx, stroke: readConfObject(config, 'stickColor', { feature }), strokeWidth: readConfObject(config, 'stickWidth', { feature }) }));
|
|
6
6
|
});
|
|
7
7
|
export default Stick;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jbrowse/plugin-lollipop",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "JBrowse 2 plugin for lollipops",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jbrowse",
|
|
@@ -50,5 +50,5 @@
|
|
|
50
50
|
"publishConfig": {
|
|
51
51
|
"access": "public"
|
|
52
52
|
},
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "2c6897f1fa732b1db5b094d1dca197e333e95319"
|
|
54
54
|
}
|