@jbrowse/plugin-linear-genome-view 2.11.0 → 2.11.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/BaseLinearDisplay/components/Tooltip.js +1 -0
- package/dist/BasicTrack/index.d.ts +1 -2
- package/dist/BasicTrack/index.js +3 -2
- package/dist/FeatureTrack/index.d.ts +1 -2
- package/dist/FeatureTrack/index.js +3 -2
- package/dist/LaunchLinearGenomeView/index.d.ts +1 -2
- package/dist/LaunchLinearGenomeView/index.js +3 -2
- package/dist/LinearBareDisplay/index.d.ts +1 -2
- package/dist/LinearBareDisplay/index.js +3 -2
- package/dist/LinearBasicDisplay/index.d.ts +1 -2
- package/dist/LinearBasicDisplay/index.js +3 -2
- package/dist/LinearGenomeView/components/Cytobands.js +11 -12
- package/dist/LinearGenomeView/components/OverviewScalebarPolygon.js +2 -1
- package/dist/LinearGenomeView/svgcomponents/SVGHeader.js +1 -1
- package/dist/LinearGenomeView/svgcomponents/SVGTrackLabel.js +1 -1
- package/esm/BaseLinearDisplay/components/Tooltip.js +1 -0
- package/esm/BasicTrack/index.d.ts +1 -2
- package/esm/BasicTrack/index.js +2 -2
- package/esm/FeatureTrack/index.d.ts +1 -2
- package/esm/FeatureTrack/index.js +2 -2
- package/esm/LaunchLinearGenomeView/index.d.ts +1 -2
- package/esm/LaunchLinearGenomeView/index.js +2 -2
- package/esm/LinearBareDisplay/index.d.ts +1 -2
- package/esm/LinearBareDisplay/index.js +2 -2
- package/esm/LinearBasicDisplay/index.d.ts +1 -2
- package/esm/LinearBasicDisplay/index.js +2 -2
- package/esm/LinearGenomeView/components/Cytobands.js +11 -12
- package/esm/LinearGenomeView/components/OverviewScalebarPolygon.js +2 -1
- package/esm/LinearGenomeView/svgcomponents/SVGHeader.js +1 -1
- package/esm/LinearGenomeView/svgcomponents/SVGTrackLabel.js +2 -2
- package/package.json +2 -2
|
@@ -40,6 +40,7 @@ const Tooltip = (0, mobx_react_1.observer)(function ({ model, clientMouseCoord,
|
|
|
40
40
|
const y = clientMouseCoord[1];
|
|
41
41
|
const { refs, floatingStyles, context } = (0, react_2.useFloating)({
|
|
42
42
|
placement: 'right',
|
|
43
|
+
strategy: 'fixed',
|
|
43
44
|
});
|
|
44
45
|
const clientPoint = (0, react_2.useClientPoint)(context, { x, y });
|
|
45
46
|
const { getFloatingProps } = (0, react_2.useInteractions)([clientPoint]);
|
package/dist/BasicTrack/index.js
CHANGED
|
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const pluggableElementTypes_1 = require("@jbrowse/core/pluggableElementTypes");
|
|
7
7
|
const configSchema_1 = __importDefault(require("./configSchema"));
|
|
8
|
-
|
|
8
|
+
function BasicTrackF(pm) {
|
|
9
9
|
pm.addTrackType(() => {
|
|
10
10
|
const configSchema = (0, configSchema_1.default)(pm);
|
|
11
11
|
return new pluggableElementTypes_1.TrackType({
|
|
@@ -14,4 +14,5 @@ exports.default = (pm) => {
|
|
|
14
14
|
stateModel: (0, pluggableElementTypes_1.createBaseTrackModel)(pm, 'BasicTrack', configSchema),
|
|
15
15
|
});
|
|
16
16
|
});
|
|
17
|
-
}
|
|
17
|
+
}
|
|
18
|
+
exports.default = BasicTrackF;
|
|
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const pluggableElementTypes_1 = require("@jbrowse/core/pluggableElementTypes");
|
|
7
7
|
const configSchema_1 = __importDefault(require("./configSchema"));
|
|
8
|
-
|
|
8
|
+
function FeatureTrackF(pm) {
|
|
9
9
|
pm.addTrackType(() => {
|
|
10
10
|
const configSchema = (0, configSchema_1.default)(pm);
|
|
11
11
|
return new pluggableElementTypes_1.TrackType({
|
|
@@ -15,4 +15,5 @@ exports.default = (pm) => {
|
|
|
15
15
|
stateModel: (0, pluggableElementTypes_1.createBaseTrackModel)(pm, 'FeatureTrack', configSchema),
|
|
16
16
|
});
|
|
17
17
|
});
|
|
18
|
-
}
|
|
18
|
+
}
|
|
19
|
+
exports.default = FeatureTrackF;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const util_1 = require("@jbrowse/core/util");
|
|
4
4
|
const searchUtils_1 = require("../searchUtils");
|
|
5
|
-
|
|
5
|
+
function LaunchLinearGenomeViewF(pluginManager) {
|
|
6
6
|
pluginManager.addToExtensionPoint('LaunchView-LinearGenomeView',
|
|
7
7
|
// @ts-expect-error
|
|
8
8
|
async ({ session, assembly, loc, tracks = [], tracklist, nav, highlight, }) => {
|
|
@@ -51,7 +51,8 @@ exports.default = (pluginManager) => {
|
|
|
51
51
|
throw e;
|
|
52
52
|
}
|
|
53
53
|
});
|
|
54
|
-
}
|
|
54
|
+
}
|
|
55
|
+
exports.default = LaunchLinearGenomeViewF;
|
|
55
56
|
function tryTrack(model, trackId, idsNotFound) {
|
|
56
57
|
try {
|
|
57
58
|
model.showTrack(trackId);
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import PluginManager from '@jbrowse/core/PluginManager';
|
|
2
|
-
|
|
3
|
-
export default _default;
|
|
2
|
+
export default function LinearBareDisplayF(pluginManager: PluginManager): void;
|
|
4
3
|
export { configSchemaFactory } from './configSchema';
|
|
5
4
|
export { stateModelFactory } from './model';
|
|
@@ -6,7 +6,7 @@ const pluggableElementTypes_1 = require("@jbrowse/core/pluggableElementTypes");
|
|
|
6
6
|
const configSchema_1 = require("./configSchema");
|
|
7
7
|
const model_1 = require("./model");
|
|
8
8
|
const BaseLinearDisplay_1 = require("../BaseLinearDisplay/");
|
|
9
|
-
|
|
9
|
+
function LinearBareDisplayF(pluginManager) {
|
|
10
10
|
pluginManager.addDisplayType(() => {
|
|
11
11
|
const configSchema = (0, configSchema_1.configSchemaFactory)(pluginManager);
|
|
12
12
|
return new pluggableElementTypes_1.DisplayType({
|
|
@@ -19,7 +19,8 @@ exports.default = (pluginManager) => {
|
|
|
19
19
|
ReactComponent: BaseLinearDisplay_1.BaseLinearDisplayComponent,
|
|
20
20
|
});
|
|
21
21
|
});
|
|
22
|
-
}
|
|
22
|
+
}
|
|
23
|
+
exports.default = LinearBareDisplayF;
|
|
23
24
|
var configSchema_2 = require("./configSchema");
|
|
24
25
|
Object.defineProperty(exports, "configSchemaFactory", { enumerable: true, get: function () { return configSchema_2.configSchemaFactory; } });
|
|
25
26
|
var model_2 = require("./model");
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import PluginManager from '@jbrowse/core/PluginManager';
|
|
2
|
-
|
|
3
|
-
export default _default;
|
|
2
|
+
export default function LinearBasicDisplay(pluginManager: PluginManager): void;
|
|
4
3
|
export { default as modelFactory } from './model';
|
|
5
4
|
export { default as configSchema } from './configSchema';
|
|
@@ -9,7 +9,7 @@ const BaseLinearDisplay_1 = require("../BaseLinearDisplay");
|
|
|
9
9
|
// locals
|
|
10
10
|
const configSchema_1 = __importDefault(require("./configSchema"));
|
|
11
11
|
const model_1 = __importDefault(require("./model"));
|
|
12
|
-
|
|
12
|
+
function LinearBasicDisplay(pluginManager) {
|
|
13
13
|
pluginManager.addDisplayType(() => {
|
|
14
14
|
const config = (0, configSchema_1.default)(pluginManager);
|
|
15
15
|
return new pluggableElementTypes_1.DisplayType({
|
|
@@ -22,7 +22,8 @@ exports.default = (pluginManager) => {
|
|
|
22
22
|
ReactComponent: BaseLinearDisplay_1.BaseLinearDisplayComponent,
|
|
23
23
|
});
|
|
24
24
|
});
|
|
25
|
-
}
|
|
25
|
+
}
|
|
26
|
+
exports.default = LinearBasicDisplay;
|
|
26
27
|
var model_2 = require("./model");
|
|
27
28
|
Object.defineProperty(exports, "modelFactory", { enumerable: true, get: function () { return __importDefault(model_2).default; } });
|
|
28
29
|
var configSchema_2 = require("./configSchema");
|
|
@@ -8,6 +8,7 @@ const mobx_react_1 = require("mobx-react");
|
|
|
8
8
|
// locals
|
|
9
9
|
const __1 = require("..");
|
|
10
10
|
const util_1 = require("./util");
|
|
11
|
+
const util_2 = require("@jbrowse/core/util");
|
|
11
12
|
// rounded rect from https://stackoverflow.com/a/45889603/2129219
|
|
12
13
|
// prettier-ignore
|
|
13
14
|
function rightRoundedRect(x, y, width, height, radius) {
|
|
@@ -68,28 +69,26 @@ const Cytobands = (0, mobx_react_1.observer)(function ({ overview, block, assemb
|
|
|
68
69
|
const e = overview.bpToPx({ refName, coord: end }) || 0;
|
|
69
70
|
const l = Math.min(s, e);
|
|
70
71
|
const w = Math.abs(e - s);
|
|
71
|
-
const c = colorMap[type];
|
|
72
|
+
const c = colorMap[type] || 'black';
|
|
72
73
|
if (type === 'acen' && !centromereSeen) {
|
|
73
74
|
centromereSeen = true; // the next acen entry is drawn with different right triangle
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
return react_1.default.createElement("polygon", { key: k, points: tri, fill: c });
|
|
75
|
+
return (react_1.default.createElement("polygon", { key: k, points: reversed
|
|
76
|
+
? rightTriangle(s - w, 0, w, h)
|
|
77
|
+
: leftTriangle(s, 0, w, h), ...(0, util_2.getFillProps)(c) }));
|
|
78
78
|
}
|
|
79
79
|
else if (type === 'acen' && centromereSeen) {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
return react_1.default.createElement("polygon", { key: k, points: tri, fill: c });
|
|
80
|
+
return (react_1.default.createElement("polygon", { key: k, points: reversed
|
|
81
|
+
? leftTriangle(s - w, 0, w, h)
|
|
82
|
+
: rightTriangle(s, 0, w, h), ...(0, util_2.getFillProps)(c) }));
|
|
84
83
|
}
|
|
85
84
|
else if (lcap === index) {
|
|
86
|
-
return react_1.default.createElement("path", { key: k, d: leftRoundedRect(l, 0, w, h, 8),
|
|
85
|
+
return (react_1.default.createElement("path", { key: k, d: leftRoundedRect(l, 0, w, h, 8), ...(0, util_2.getFillProps)(c) }));
|
|
87
86
|
}
|
|
88
87
|
else if (rcap === index) {
|
|
89
|
-
return react_1.default.createElement("path", { key: k, d: rightRoundedRect(l, 0, w, h, 8),
|
|
88
|
+
return (react_1.default.createElement("path", { key: k, d: rightRoundedRect(l, 0, w, h, 8), ...(0, util_2.getFillProps)(c) }));
|
|
90
89
|
}
|
|
91
90
|
else {
|
|
92
|
-
return react_1.default.createElement("rect", { key: k, x: l, y: 0, width: w, height: h,
|
|
91
|
+
return (react_1.default.createElement("rect", { key: k, x: l, y: 0, width: w, height: h, ...(0, util_2.getFillProps)(c) }));
|
|
93
92
|
}
|
|
94
93
|
})));
|
|
95
94
|
});
|
|
@@ -8,6 +8,7 @@ const material_1 = require("@mui/material");
|
|
|
8
8
|
const mobx_react_1 = require("mobx-react");
|
|
9
9
|
// locals
|
|
10
10
|
const __1 = require("..");
|
|
11
|
+
const util_1 = require("@jbrowse/core/util");
|
|
11
12
|
const OverviewScalebarPolygon = (0, mobx_react_1.observer)(function ({ model, overview, useOffset = true, }) {
|
|
12
13
|
const theme = (0, material_1.useTheme)();
|
|
13
14
|
const multiplier = Number(useOffset);
|
|
@@ -41,6 +42,6 @@ const OverviewScalebarPolygon = (0, mobx_react_1.observer)(function ({ model, ov
|
|
|
41
42
|
[topRight, 0],
|
|
42
43
|
[topLeft, 0],
|
|
43
44
|
];
|
|
44
|
-
return (react_1.default.createElement("polygon", { points: points.toString(),
|
|
45
|
+
return (react_1.default.createElement("polygon", { points: points.toString(), ...(0, util_1.getFillProps)((0, material_1.alpha)(polygonColor, 0.3)), ...(0, util_1.getStrokeProps)((0, material_1.alpha)(polygonColor, 0.8)) }));
|
|
45
46
|
});
|
|
46
47
|
exports.default = OverviewScalebarPolygon;
|
|
@@ -47,7 +47,7 @@ function SVGHeader({ model, fontSize, cytobandHeight, rulerHeight, }) {
|
|
|
47
47
|
react_1.default.createElement("text", { x: 0, y: 0, dominantBaseline: "hanging", fontSize: fontSize, fill: c }, assemblyName),
|
|
48
48
|
showCytobands ? (react_1.default.createElement("g", { transform: `translate(0 ${rulerHeight})` },
|
|
49
49
|
react_1.default.createElement(Cytobands_1.default, { overview: overview, assembly: assembly, block: block }),
|
|
50
|
-
react_1.default.createElement("rect", { stroke: "red", fill: "rgb(255,0,0,0.1
|
|
50
|
+
react_1.default.createElement("rect", { stroke: "red", fill: "rgb(255,0,0)", fillOpacity: 0.1, width: Math.max(lastOverviewPx - firstOverviewPx, 0.5), height: __1.HEADER_OVERVIEW_HEIGHT - 1, x: firstOverviewPx, y: 0.5 }),
|
|
51
51
|
react_1.default.createElement("g", { transform: `translate(0,${__1.HEADER_OVERVIEW_HEIGHT})` },
|
|
52
52
|
react_1.default.createElement(OverviewScalebarPolygon_1.default, { overview: overview, model: model, useOffset: false })))) : null,
|
|
53
53
|
react_1.default.createElement("g", { transform: `translate(0 ${fontSize + y})` },
|
|
@@ -8,7 +8,7 @@ const material_1 = require("@mui/material");
|
|
|
8
8
|
const util_1 = require("@jbrowse/core/util");
|
|
9
9
|
function SVGTrackLabel({ trackLabels, trackName, fontSize, trackLabelOffset, x, }) {
|
|
10
10
|
const theme = (0, material_1.useTheme)();
|
|
11
|
-
const fill = theme.palette.text.primary;
|
|
11
|
+
const fill = (0, util_1.stripAlpha)(theme.palette.text.primary);
|
|
12
12
|
const xoff = trackLabels === 'overlay' ? 5 : 0;
|
|
13
13
|
const yoff = trackLabels === 'offset' ? 5 : 0;
|
|
14
14
|
const name = (0, util_1.coarseStripHTML)(trackName);
|
|
@@ -35,6 +35,7 @@ const Tooltip = observer(function ({ model, clientMouseCoord, }) {
|
|
|
35
35
|
const y = clientMouseCoord[1];
|
|
36
36
|
const { refs, floatingStyles, context } = useFloating({
|
|
37
37
|
placement: 'right',
|
|
38
|
+
strategy: 'fixed',
|
|
38
39
|
});
|
|
39
40
|
const clientPoint = useClientPoint(context, { x, y });
|
|
40
41
|
const { getFloatingProps } = useInteractions([clientPoint]);
|
package/esm/BasicTrack/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createBaseTrackModel, TrackType, } from '@jbrowse/core/pluggableElementTypes';
|
|
2
2
|
import configSchemaF from './configSchema';
|
|
3
|
-
export default (pm)
|
|
3
|
+
export default function BasicTrackF(pm) {
|
|
4
4
|
pm.addTrackType(() => {
|
|
5
5
|
const configSchema = configSchemaF(pm);
|
|
6
6
|
return new TrackType({
|
|
@@ -9,4 +9,4 @@ export default (pm) => {
|
|
|
9
9
|
stateModel: createBaseTrackModel(pm, 'BasicTrack', configSchema),
|
|
10
10
|
});
|
|
11
11
|
});
|
|
12
|
-
}
|
|
12
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createBaseTrackModel, TrackType, } from '@jbrowse/core/pluggableElementTypes';
|
|
2
2
|
import configSchemaF from './configSchema';
|
|
3
|
-
export default (pm)
|
|
3
|
+
export default function FeatureTrackF(pm) {
|
|
4
4
|
pm.addTrackType(() => {
|
|
5
5
|
const configSchema = configSchemaF(pm);
|
|
6
6
|
return new TrackType({
|
|
@@ -10,4 +10,4 @@ export default (pm) => {
|
|
|
10
10
|
stateModel: createBaseTrackModel(pm, 'FeatureTrack', configSchema),
|
|
11
11
|
});
|
|
12
12
|
});
|
|
13
|
-
}
|
|
13
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { when, parseLocString, } from '@jbrowse/core/util';
|
|
2
2
|
import { handleSelectedRegion } from '../searchUtils';
|
|
3
|
-
export default (pluginManager)
|
|
3
|
+
export default function LaunchLinearGenomeViewF(pluginManager) {
|
|
4
4
|
pluginManager.addToExtensionPoint('LaunchView-LinearGenomeView',
|
|
5
5
|
// @ts-expect-error
|
|
6
6
|
async ({ session, assembly, loc, tracks = [], tracklist, nav, highlight, }) => {
|
|
@@ -49,7 +49,7 @@ export default (pluginManager) => {
|
|
|
49
49
|
throw e;
|
|
50
50
|
}
|
|
51
51
|
});
|
|
52
|
-
}
|
|
52
|
+
}
|
|
53
53
|
function tryTrack(model, trackId, idsNotFound) {
|
|
54
54
|
try {
|
|
55
55
|
model.showTrack(trackId);
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import PluginManager from '@jbrowse/core/PluginManager';
|
|
2
|
-
|
|
3
|
-
export default _default;
|
|
2
|
+
export default function LinearBareDisplayF(pluginManager: PluginManager): void;
|
|
4
3
|
export { configSchemaFactory } from './configSchema';
|
|
5
4
|
export { stateModelFactory } from './model';
|
|
@@ -3,7 +3,7 @@ import { DisplayType } from '@jbrowse/core/pluggableElementTypes';
|
|
|
3
3
|
import { configSchemaFactory } from './configSchema';
|
|
4
4
|
import { stateModelFactory } from './model';
|
|
5
5
|
import { BaseLinearDisplayComponent } from '../BaseLinearDisplay/';
|
|
6
|
-
export default (pluginManager)
|
|
6
|
+
export default function LinearBareDisplayF(pluginManager) {
|
|
7
7
|
pluginManager.addDisplayType(() => {
|
|
8
8
|
const configSchema = configSchemaFactory(pluginManager);
|
|
9
9
|
return new DisplayType({
|
|
@@ -16,6 +16,6 @@ export default (pluginManager) => {
|
|
|
16
16
|
ReactComponent: BaseLinearDisplayComponent,
|
|
17
17
|
});
|
|
18
18
|
});
|
|
19
|
-
}
|
|
19
|
+
}
|
|
20
20
|
export { configSchemaFactory } from './configSchema';
|
|
21
21
|
export { stateModelFactory } from './model';
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import PluginManager from '@jbrowse/core/PluginManager';
|
|
2
|
-
|
|
3
|
-
export default _default;
|
|
2
|
+
export default function LinearBasicDisplay(pluginManager: PluginManager): void;
|
|
4
3
|
export { default as modelFactory } from './model';
|
|
5
4
|
export { default as configSchema } from './configSchema';
|
|
@@ -3,7 +3,7 @@ import { BaseLinearDisplayComponent } from '../BaseLinearDisplay';
|
|
|
3
3
|
// locals
|
|
4
4
|
import configSchema from './configSchema';
|
|
5
5
|
import modelFactory from './model';
|
|
6
|
-
export default (pluginManager)
|
|
6
|
+
export default function LinearBasicDisplay(pluginManager) {
|
|
7
7
|
pluginManager.addDisplayType(() => {
|
|
8
8
|
const config = configSchema(pluginManager);
|
|
9
9
|
return new DisplayType({
|
|
@@ -16,6 +16,6 @@ export default (pluginManager) => {
|
|
|
16
16
|
ReactComponent: BaseLinearDisplayComponent,
|
|
17
17
|
});
|
|
18
18
|
});
|
|
19
|
-
}
|
|
19
|
+
}
|
|
20
20
|
export { default as modelFactory } from './model';
|
|
21
21
|
export { default as configSchema } from './configSchema';
|
|
@@ -3,6 +3,7 @@ import { observer } from 'mobx-react';
|
|
|
3
3
|
// locals
|
|
4
4
|
import { HEADER_OVERVIEW_HEIGHT } from '..';
|
|
5
5
|
import { getCytobands } from './util';
|
|
6
|
+
import { getFillProps } from '@jbrowse/core/util';
|
|
6
7
|
// rounded rect from https://stackoverflow.com/a/45889603/2129219
|
|
7
8
|
// prettier-ignore
|
|
8
9
|
function rightRoundedRect(x, y, width, height, radius) {
|
|
@@ -63,28 +64,26 @@ const Cytobands = observer(function ({ overview, block, assembly, }) {
|
|
|
63
64
|
const e = overview.bpToPx({ refName, coord: end }) || 0;
|
|
64
65
|
const l = Math.min(s, e);
|
|
65
66
|
const w = Math.abs(e - s);
|
|
66
|
-
const c = colorMap[type];
|
|
67
|
+
const c = colorMap[type] || 'black';
|
|
67
68
|
if (type === 'acen' && !centromereSeen) {
|
|
68
69
|
centromereSeen = true; // the next acen entry is drawn with different right triangle
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
return React.createElement("polygon", { key: k, points: tri, fill: c });
|
|
70
|
+
return (React.createElement("polygon", { key: k, points: reversed
|
|
71
|
+
? rightTriangle(s - w, 0, w, h)
|
|
72
|
+
: leftTriangle(s, 0, w, h), ...getFillProps(c) }));
|
|
73
73
|
}
|
|
74
74
|
else if (type === 'acen' && centromereSeen) {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
return React.createElement("polygon", { key: k, points: tri, fill: c });
|
|
75
|
+
return (React.createElement("polygon", { key: k, points: reversed
|
|
76
|
+
? leftTriangle(s - w, 0, w, h)
|
|
77
|
+
: rightTriangle(s, 0, w, h), ...getFillProps(c) }));
|
|
79
78
|
}
|
|
80
79
|
else if (lcap === index) {
|
|
81
|
-
return React.createElement("path", { key: k, d: leftRoundedRect(l, 0, w, h, 8),
|
|
80
|
+
return (React.createElement("path", { key: k, d: leftRoundedRect(l, 0, w, h, 8), ...getFillProps(c) }));
|
|
82
81
|
}
|
|
83
82
|
else if (rcap === index) {
|
|
84
|
-
return React.createElement("path", { key: k, d: rightRoundedRect(l, 0, w, h, 8),
|
|
83
|
+
return (React.createElement("path", { key: k, d: rightRoundedRect(l, 0, w, h, 8), ...getFillProps(c) }));
|
|
85
84
|
}
|
|
86
85
|
else {
|
|
87
|
-
return React.createElement("rect", { key: k, x: l, y: 0, width: w, height: h,
|
|
86
|
+
return (React.createElement("rect", { key: k, x: l, y: 0, width: w, height: h, ...getFillProps(c) }));
|
|
88
87
|
}
|
|
89
88
|
})));
|
|
90
89
|
});
|
|
@@ -3,6 +3,7 @@ import { useTheme, alpha } from '@mui/material';
|
|
|
3
3
|
import { observer } from 'mobx-react';
|
|
4
4
|
// locals
|
|
5
5
|
import { HEADER_BAR_HEIGHT } from '..';
|
|
6
|
+
import { getFillProps, getStrokeProps } from '@jbrowse/core/util';
|
|
6
7
|
const OverviewScalebarPolygon = observer(function ({ model, overview, useOffset = true, }) {
|
|
7
8
|
const theme = useTheme();
|
|
8
9
|
const multiplier = Number(useOffset);
|
|
@@ -36,6 +37,6 @@ const OverviewScalebarPolygon = observer(function ({ model, overview, useOffset
|
|
|
36
37
|
[topRight, 0],
|
|
37
38
|
[topLeft, 0],
|
|
38
39
|
];
|
|
39
|
-
return (React.createElement("polygon", { points: points.toString(),
|
|
40
|
+
return (React.createElement("polygon", { points: points.toString(), ...getFillProps(alpha(polygonColor, 0.3)), ...getStrokeProps(alpha(polygonColor, 0.8)) }));
|
|
40
41
|
});
|
|
41
42
|
export default OverviewScalebarPolygon;
|
|
@@ -42,7 +42,7 @@ export default function SVGHeader({ model, fontSize, cytobandHeight, rulerHeight
|
|
|
42
42
|
React.createElement("text", { x: 0, y: 0, dominantBaseline: "hanging", fontSize: fontSize, fill: c }, assemblyName),
|
|
43
43
|
showCytobands ? (React.createElement("g", { transform: `translate(0 ${rulerHeight})` },
|
|
44
44
|
React.createElement(Cytobands, { overview: overview, assembly: assembly, block: block }),
|
|
45
|
-
React.createElement("rect", { stroke: "red", fill: "rgb(255,0,0,0.1
|
|
45
|
+
React.createElement("rect", { stroke: "red", fill: "rgb(255,0,0)", fillOpacity: 0.1, width: Math.max(lastOverviewPx - firstOverviewPx, 0.5), height: HEADER_OVERVIEW_HEIGHT - 1, x: firstOverviewPx, y: 0.5 }),
|
|
46
46
|
React.createElement("g", { transform: `translate(0,${HEADER_OVERVIEW_HEIGHT})` },
|
|
47
47
|
React.createElement(OverviewScalebarPolygon, { overview: overview, model: model, useOffset: false })))) : null,
|
|
48
48
|
React.createElement("g", { transform: `translate(0 ${fontSize + y})` },
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useTheme } from '@mui/material';
|
|
3
|
-
import { coarseStripHTML } from '@jbrowse/core/util';
|
|
3
|
+
import { coarseStripHTML, stripAlpha } from '@jbrowse/core/util';
|
|
4
4
|
export default function SVGTrackLabel({ trackLabels, trackName, fontSize, trackLabelOffset, x, }) {
|
|
5
5
|
const theme = useTheme();
|
|
6
|
-
const fill = theme.palette.text.primary;
|
|
6
|
+
const fill = stripAlpha(theme.palette.text.primary);
|
|
7
7
|
const xoff = trackLabels === 'overlay' ? 5 : 0;
|
|
8
8
|
const yoff = trackLabels === 'offset' ? 5 : 0;
|
|
9
9
|
const name = coarseStripHTML(trackName);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jbrowse/plugin-linear-genome-view",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.1",
|
|
4
4
|
"description": "JBrowse 2 linear genome view",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jbrowse",
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"access": "public"
|
|
64
64
|
},
|
|
65
65
|
"module": "esm/index.js",
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "11b28d66d782eb06f92ccb993108bb6c3c82819e"
|
|
67
67
|
}
|