@jbrowse/plugin-variants 2.10.0 → 2.10.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/StructuralVariantChordRenderer/Chord.d.ts +1 -1
- package/dist/StructuralVariantChordRenderer/Chord.js +1 -1
- package/dist/StructuralVariantChordRenderer/ReactComponent.js +5 -17
- package/esm/StructuralVariantChordRenderer/Chord.d.ts +1 -1
- package/esm/StructuralVariantChordRenderer/Chord.js +1 -1
- package/esm/StructuralVariantChordRenderer/ReactComponent.js +5 -17
- package/package.json +2 -2
|
@@ -25,6 +25,6 @@ declare const Chord: ({ feature, blocksForRefs, radius, config, bezierRadius, se
|
|
|
25
25
|
config: AnyConfigurationModel;
|
|
26
26
|
bezierRadius: number;
|
|
27
27
|
selected: boolean;
|
|
28
|
-
onClick: (
|
|
28
|
+
onClick: (feat: Feature, reg: AnyRegion, end: AnyRegion, evt: unknown) => void;
|
|
29
29
|
}) => React.JSX.Element | null;
|
|
30
30
|
export default Chord;
|
|
@@ -87,7 +87,7 @@ const Chord = (0, mobx_react_1.observer)(function Chord({ feature, blocksForRefs
|
|
|
87
87
|
const hoverStrokeColor = (0, configuration_1.readConfObject)(config, 'strokeColorHover', {
|
|
88
88
|
feature,
|
|
89
89
|
});
|
|
90
|
-
return (react_1.default.createElement("path", { "data-testid": `chord-${feature.id()}`, d: ['M', ...startXY, 'Q', ...controlXY, ...endXY].join(' '), stroke: hovered ? hoverStrokeColor : strokeColor, strokeWidth: hovered ? 3 : 1, onClick: evt => {
|
|
90
|
+
return (react_1.default.createElement("path", { "data-testid": `chord-${feature.id()}`, cursor: "crosshair", fill: "none", d: ['M', ...startXY, 'Q', ...controlXY, ...endXY].join(' '), stroke: hovered ? hoverStrokeColor : strokeColor, strokeWidth: hovered ? 3 : 1, onClick: evt => {
|
|
91
91
|
if (endBlock && startBlock) {
|
|
92
92
|
onClick(feature, startBlock.region, endBlock.region, evt);
|
|
93
93
|
}
|
|
@@ -44,22 +44,10 @@ const StructuralVariantChordsReactComponent = (0, mobx_react_1.observer)(functio
|
|
|
44
44
|
}
|
|
45
45
|
return blocksForRefs;
|
|
46
46
|
}, [blockDefinitions]);
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
__html: `
|
|
53
|
-
#${trackStyleId} > path {
|
|
54
|
-
cursor: crosshair;
|
|
55
|
-
fill: none;
|
|
56
|
-
}
|
|
57
|
-
`,
|
|
58
|
-
} }),
|
|
59
|
-
[...features.values()].map(feature => {
|
|
60
|
-
const id = feature.id();
|
|
61
|
-
const selected = String(selectedFeatureId) === String(id);
|
|
62
|
-
return (react_1.default.createElement(Chord_1.default, { key: id, feature: feature, config: config, radius: radius, bezierRadius: bezierRadius, blocksForRefs: blocksForRefsMemo, selected: selected, onClick: onChordClick }));
|
|
63
|
-
})));
|
|
47
|
+
return (react_1.default.createElement("g", { id: `chords-${typeof jest !== 'undefined' ? 'test' : displayModel.id}`, "data-testid": "structuralVariantChordRenderer" }, [...features.values()].map(feature => {
|
|
48
|
+
const id = feature.id();
|
|
49
|
+
const selected = String(selectedFeatureId) === String(id);
|
|
50
|
+
return (react_1.default.createElement(Chord_1.default, { key: id, feature: feature, config: config, radius: radius, bezierRadius: bezierRadius, blocksForRefs: blocksForRefsMemo, selected: selected, onClick: onChordClick }));
|
|
51
|
+
})));
|
|
64
52
|
});
|
|
65
53
|
exports.default = StructuralVariantChordsReactComponent;
|
|
@@ -25,6 +25,6 @@ declare const Chord: ({ feature, blocksForRefs, radius, config, bezierRadius, se
|
|
|
25
25
|
config: AnyConfigurationModel;
|
|
26
26
|
bezierRadius: number;
|
|
27
27
|
selected: boolean;
|
|
28
|
-
onClick: (
|
|
28
|
+
onClick: (feat: Feature, reg: AnyRegion, end: AnyRegion, evt: unknown) => void;
|
|
29
29
|
}) => React.JSX.Element | null;
|
|
30
30
|
export default Chord;
|
|
@@ -62,7 +62,7 @@ const Chord = observer(function Chord({ feature, blocksForRefs, radius, config,
|
|
|
62
62
|
const hoverStrokeColor = readConfObject(config, 'strokeColorHover', {
|
|
63
63
|
feature,
|
|
64
64
|
});
|
|
65
|
-
return (React.createElement("path", { "data-testid": `chord-${feature.id()}`, d: ['M', ...startXY, 'Q', ...controlXY, ...endXY].join(' '), stroke: hovered ? hoverStrokeColor : strokeColor, strokeWidth: hovered ? 3 : 1, onClick: evt => {
|
|
65
|
+
return (React.createElement("path", { "data-testid": `chord-${feature.id()}`, cursor: "crosshair", fill: "none", d: ['M', ...startXY, 'Q', ...controlXY, ...endXY].join(' '), stroke: hovered ? hoverStrokeColor : strokeColor, strokeWidth: hovered ? 3 : 1, onClick: evt => {
|
|
66
66
|
if (endBlock && startBlock) {
|
|
67
67
|
onClick(feature, startBlock.region, endBlock.region, evt);
|
|
68
68
|
}
|
|
@@ -16,22 +16,10 @@ const StructuralVariantChordsReactComponent = observer(function ({ features, con
|
|
|
16
16
|
}
|
|
17
17
|
return blocksForRefs;
|
|
18
18
|
}, [blockDefinitions]);
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
__html: `
|
|
25
|
-
#${trackStyleId} > path {
|
|
26
|
-
cursor: crosshair;
|
|
27
|
-
fill: none;
|
|
28
|
-
}
|
|
29
|
-
`,
|
|
30
|
-
} }),
|
|
31
|
-
[...features.values()].map(feature => {
|
|
32
|
-
const id = feature.id();
|
|
33
|
-
const selected = String(selectedFeatureId) === String(id);
|
|
34
|
-
return (React.createElement(Chord, { key: id, feature: feature, config: config, radius: radius, bezierRadius: bezierRadius, blocksForRefs: blocksForRefsMemo, selected: selected, onClick: onChordClick }));
|
|
35
|
-
})));
|
|
19
|
+
return (React.createElement("g", { id: `chords-${typeof jest !== 'undefined' ? 'test' : displayModel.id}`, "data-testid": "structuralVariantChordRenderer" }, [...features.values()].map(feature => {
|
|
20
|
+
const id = feature.id();
|
|
21
|
+
const selected = String(selectedFeatureId) === String(id);
|
|
22
|
+
return (React.createElement(Chord, { key: id, feature: feature, config: config, radius: radius, bezierRadius: bezierRadius, blocksForRefs: blocksForRefsMemo, selected: selected, onClick: onChordClick }));
|
|
23
|
+
})));
|
|
36
24
|
});
|
|
37
25
|
export default StructuralVariantChordsReactComponent;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jbrowse/plugin-variants",
|
|
3
|
-
"version": "2.10.
|
|
3
|
+
"version": "2.10.1",
|
|
4
4
|
"description": "JBrowse 2 variant adapters, tracks, etc.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jbrowse",
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"distModule": "esm/index.js",
|
|
64
64
|
"srcModule": "src/index.ts",
|
|
65
65
|
"module": "esm/index.js",
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "442b5f87efddfdf4ccf520b4d9dd01ddd370cb07"
|
|
67
67
|
}
|