@jbrowse/plugin-wiggle 3.3.0 → 3.5.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/BigWigAdapter/BigWigAdapter.d.ts +0 -1
- package/dist/BigWigAdapter/BigWigAdapter.js +0 -1
- package/dist/MultiLinearWiggleDisplay/components/Tooltip.js +5 -1
- package/dist/MultiLinearWiggleDisplay/components/YScaleBars.js +2 -2
- package/dist/MultiLinearWiggleDisplay/model.d.ts +2 -0
- package/dist/MultiLinearWiggleDisplay/model.js +12 -0
- package/dist/MultiWiggleAdapter/MultiWiggleAdapter.d.ts +0 -1
- package/dist/MultiWiggleAdapter/MultiWiggleAdapter.js +0 -1
- package/dist/WiggleBaseRenderer.d.ts +4 -4
- package/dist/drawDensity.js +12 -4
- package/dist/drawLine.js +4 -2
- package/dist/drawXY.js +7 -3
- package/esm/BigWigAdapter/BigWigAdapter.d.ts +0 -1
- package/esm/BigWigAdapter/BigWigAdapter.js +0 -1
- package/esm/MultiLinearWiggleDisplay/components/Tooltip.js +5 -1
- package/esm/MultiLinearWiggleDisplay/components/YScaleBars.js +2 -2
- package/esm/MultiLinearWiggleDisplay/model.d.ts +2 -0
- package/esm/MultiLinearWiggleDisplay/model.js +12 -0
- package/esm/MultiWiggleAdapter/MultiWiggleAdapter.d.ts +0 -1
- package/esm/MultiWiggleAdapter/MultiWiggleAdapter.js +0 -1
- package/esm/WiggleBaseRenderer.d.ts +4 -4
- package/esm/drawDensity.js +12 -4
- package/esm/drawLine.js +4 -2
- package/esm/drawXY.js +7 -3
- package/package.json +6 -6
|
@@ -19,7 +19,11 @@ const TooltipContents = (0, react_1.forwardRef)(function TooltipContents2({ mode
|
|
|
19
19
|
const source = feature.get('source');
|
|
20
20
|
const summary = feature.get('summary');
|
|
21
21
|
const obj = Object.fromEntries(model.sources.map(ent => [ent.name, ent]));
|
|
22
|
-
return ((0, jsx_runtime_1.jsxs)("div", { ref: ref, children: [[refName, coord].filter(f => !!f).join(':'), (0, jsx_runtime_1.jsx)("br", {}), sources ? ((0, jsx_runtime_1.jsxs)("table", { children: [(0, jsx_runtime_1.jsx)("thead", { children: (0, jsx_runtime_1.jsxs)("tr", { children: [(0, jsx_runtime_1.jsx)("th", { children: "color" }), (0, jsx_runtime_1.jsx)("th", { children: "source" }), (0, jsx_runtime_1.jsx)("th", { children: "score" })] }) }), (0, jsx_runtime_1.jsx)("tbody", { children: Object.entries(sources).map(([source, data]) => ((0, jsx_runtime_1.jsxs)("tr", { children: [(0, jsx_runtime_1.jsx)("td", {
|
|
22
|
+
return ((0, jsx_runtime_1.jsxs)("div", { ref: ref, children: [[refName, coord].filter(f => !!f).join(':'), (0, jsx_runtime_1.jsx)("br", {}), sources ? ((0, jsx_runtime_1.jsxs)("table", { children: [(0, jsx_runtime_1.jsx)("thead", { children: (0, jsx_runtime_1.jsxs)("tr", { children: [(0, jsx_runtime_1.jsx)("th", { children: "color" }), (0, jsx_runtime_1.jsx)("th", { children: "source" }), (0, jsx_runtime_1.jsx)("th", { children: "score" })] }) }), (0, jsx_runtime_1.jsx)("tbody", { children: Object.entries(sources).map(([source, data]) => ((0, jsx_runtime_1.jsxs)("tr", { children: [(0, jsx_runtime_1.jsx)("td", { children: (0, jsx_runtime_1.jsx)("div", { style: {
|
|
23
|
+
width: 16,
|
|
24
|
+
height: 16,
|
|
25
|
+
background: obj[source].color,
|
|
26
|
+
} }) }), (0, jsx_runtime_1.jsx)("td", { children: source }), (0, jsx_runtime_1.jsx)("td", { children: (0, util_1.toP)(data.score) })] }, source))) })] })) : ((0, jsx_runtime_1.jsxs)("span", { children: [source, ' ', summary
|
|
23
27
|
? `min:${(0, util_1.toP)(feature.get('minScore'))} avg:${(0, util_1.toP)(feature.get('score'))} max:${(0, util_1.toP)(feature.get('maxScore'))}`
|
|
24
28
|
: (0, util_1.toP)(feature.get('score'))] }))] }));
|
|
25
29
|
});
|
|
@@ -22,7 +22,7 @@ const Wrapper = (0, mobx_react_1.observer)(function ({ children, model, exportSV
|
|
|
22
22
|
});
|
|
23
23
|
exports.YScaleBars = (0, mobx_react_1.observer)(function (props) {
|
|
24
24
|
const { model, orientation, exportSVG } = props;
|
|
25
|
-
const { stats, needsFullHeightScalebar, sources } = model;
|
|
26
|
-
return stats && sources ? ((0, jsx_runtime_1.jsx)(Wrapper, { ...props, children: needsFullHeightScalebar ? ((0, jsx_runtime_1.jsx)(FullHeightScaleBar_1.default, { model: model, orientation: orientation, exportSVG: exportSVG })) : ((0, jsx_runtime_1.jsx)(IndividualScaleBars_1.default, { model: model, orientation: orientation, exportSVG: exportSVG })) })) : null;
|
|
25
|
+
const { showSidebar, stats, needsFullHeightScalebar, sources } = model;
|
|
26
|
+
return stats && sources ? ((0, jsx_runtime_1.jsx)(Wrapper, { ...props, children: showSidebar ? (needsFullHeightScalebar ? ((0, jsx_runtime_1.jsx)(FullHeightScaleBar_1.default, { model: model, orientation: orientation, exportSVG: exportSVG })) : ((0, jsx_runtime_1.jsx)(IndividualScaleBars_1.default, { model: model, orientation: orientation, exportSVG: exportSVG }))) : null })) : null;
|
|
27
27
|
});
|
|
28
28
|
exports.default = exports.YScaleBars;
|
|
@@ -101,6 +101,7 @@ export declare function stateModelFactory(_pluginManager: PluginManager, configS
|
|
|
101
101
|
} & {
|
|
102
102
|
type: import("mobx-state-tree").ISimpleType<"MultiLinearWiggleDisplay">;
|
|
103
103
|
layout: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IType<Source[], Source[], Source[]>, [undefined]>;
|
|
104
|
+
showSidebar: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
104
105
|
}, {
|
|
105
106
|
rendererTypeName: string;
|
|
106
107
|
error: unknown;
|
|
@@ -327,6 +328,7 @@ export declare function stateModelFactory(_pluginManager: PluginManager, configS
|
|
|
327
328
|
featureUnderMouseVolatile: Feature | undefined;
|
|
328
329
|
sourcesVolatile: Source[] | undefined;
|
|
329
330
|
} & {
|
|
331
|
+
setShowSidebar(arg: boolean): void;
|
|
330
332
|
setSourcesLoading(str: string): void;
|
|
331
333
|
setLayout(layout: Source[]): void;
|
|
332
334
|
clearLayout(): void;
|
|
@@ -63,6 +63,7 @@ function stateModelFactory(_pluginManager, configSchema) {
|
|
|
63
63
|
.compose('MultiLinearWiggleDisplay', (0, SharedWiggleMixin_1.default)(configSchema), mobx_state_tree_1.types.model({
|
|
64
64
|
type: mobx_state_tree_1.types.literal('MultiLinearWiggleDisplay'),
|
|
65
65
|
layout: mobx_state_tree_1.types.optional(mobx_state_tree_1.types.frozen(), []),
|
|
66
|
+
showSidebar: true,
|
|
66
67
|
}))
|
|
67
68
|
.volatile(() => ({
|
|
68
69
|
sourcesLoadingStopToken: undefined,
|
|
@@ -70,6 +71,9 @@ function stateModelFactory(_pluginManager, configSchema) {
|
|
|
70
71
|
sourcesVolatile: undefined,
|
|
71
72
|
}))
|
|
72
73
|
.actions(self => ({
|
|
74
|
+
setShowSidebar(arg) {
|
|
75
|
+
self.showSidebar = arg;
|
|
76
|
+
},
|
|
73
77
|
setSourcesLoading(str) {
|
|
74
78
|
if (self.sourcesLoadingStopToken) {
|
|
75
79
|
(0, stopToken_1.stopStopToken)(self.sourcesLoadingStopToken);
|
|
@@ -353,6 +357,14 @@ function stateModelFactory(_pluginManager, configSchema) {
|
|
|
353
357
|
]);
|
|
354
358
|
},
|
|
355
359
|
},
|
|
360
|
+
{
|
|
361
|
+
label: 'Show sidebar',
|
|
362
|
+
type: 'checkbox',
|
|
363
|
+
checked: self.showSidebar,
|
|
364
|
+
onClick: () => {
|
|
365
|
+
self.setShowSidebar(!self.showSidebar);
|
|
366
|
+
},
|
|
367
|
+
},
|
|
356
368
|
{
|
|
357
369
|
label: 'Edit colors/arrangement...',
|
|
358
370
|
onClick: () => {
|
|
@@ -33,7 +33,7 @@ export default abstract class WiggleBaseRenderer extends FeatureRendererType {
|
|
|
33
33
|
height: number;
|
|
34
34
|
width: number;
|
|
35
35
|
containsNoTransferables: boolean;
|
|
36
|
-
canvasRecordedData:
|
|
36
|
+
canvasRecordedData: Record<string, unknown>;
|
|
37
37
|
reactElement?: React.ReactElement;
|
|
38
38
|
html?: string;
|
|
39
39
|
} | {
|
|
@@ -41,15 +41,15 @@ export default abstract class WiggleBaseRenderer extends FeatureRendererType {
|
|
|
41
41
|
height: number;
|
|
42
42
|
width: number;
|
|
43
43
|
containsNoTransferables: boolean;
|
|
44
|
-
|
|
44
|
+
imageData: any;
|
|
45
|
+
reactElement?: React.ReactElement;
|
|
45
46
|
html?: string;
|
|
46
47
|
} | {
|
|
47
48
|
features: Map<string, Feature>;
|
|
48
49
|
height: number;
|
|
49
50
|
width: number;
|
|
50
51
|
containsNoTransferables: boolean;
|
|
51
|
-
|
|
52
|
-
reactElement?: React.ReactElement;
|
|
52
|
+
reactElement: React.ReactElement;
|
|
53
53
|
html?: string;
|
|
54
54
|
}>;
|
|
55
55
|
abstract draw<T extends RenderArgsDeserializedWithFeatures>(ctx: CanvasRenderingContext2D, props: T): Promise<Record<string, unknown> | undefined>;
|
package/dist/drawDensity.js
CHANGED
|
@@ -39,15 +39,21 @@ function drawDensity(ctx, props) {
|
|
|
39
39
|
start = performance.now();
|
|
40
40
|
}
|
|
41
41
|
const [leftPx, rightPx] = (0, util_1.featureSpanPx)(feature, region, bpPerPx);
|
|
42
|
-
if (Math.floor(leftPx) !== Math.floor(prevLeftPx)) {
|
|
42
|
+
if (Math.floor(leftPx) !== Math.floor(prevLeftPx) || rightPx - leftPx > 1) {
|
|
43
43
|
reducedFeatures.push(feature);
|
|
44
44
|
prevLeftPx = leftPx;
|
|
45
45
|
}
|
|
46
46
|
const score = feature.get('score');
|
|
47
47
|
hasClipping = hasClipping || score > niceMax || score < niceMin;
|
|
48
48
|
const w = rightPx - leftPx + fudgeFactor;
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
if (score >= scaleOpts.domain[0]) {
|
|
50
|
+
ctx.fillStyle = cb(feature, score);
|
|
51
|
+
ctx.fillRect(leftPx, 0, w, height);
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
ctx.fillStyle = '#eee';
|
|
55
|
+
ctx.fillRect(leftPx, 0, w, height);
|
|
56
|
+
}
|
|
51
57
|
}
|
|
52
58
|
ctx.save();
|
|
53
59
|
if (hasClipping) {
|
|
@@ -69,5 +75,7 @@ function drawDensity(ctx, props) {
|
|
|
69
75
|
}
|
|
70
76
|
}
|
|
71
77
|
ctx.restore();
|
|
72
|
-
return {
|
|
78
|
+
return {
|
|
79
|
+
reducedFeatures,
|
|
80
|
+
};
|
|
73
81
|
}
|
package/dist/drawLine.js
CHANGED
|
@@ -28,7 +28,7 @@ function drawLine(ctx, props) {
|
|
|
28
28
|
start = performance.now();
|
|
29
29
|
}
|
|
30
30
|
const [leftPx, rightPx] = (0, util_1.featureSpanPx)(feature, region, bpPerPx);
|
|
31
|
-
if (Math.floor(leftPx) !== Math.floor(prevLeftPx)) {
|
|
31
|
+
if (Math.floor(leftPx) !== Math.floor(prevLeftPx) || rightPx - leftPx > 1) {
|
|
32
32
|
reducedFeatures.push(feature);
|
|
33
33
|
prevLeftPx = leftPx;
|
|
34
34
|
}
|
|
@@ -71,5 +71,7 @@ function drawLine(ctx, props) {
|
|
|
71
71
|
ctx.stroke();
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
return {
|
|
74
|
+
return {
|
|
75
|
+
reducedFeatures,
|
|
76
|
+
};
|
|
75
77
|
}
|
package/dist/drawXY.js
CHANGED
|
@@ -92,7 +92,8 @@ function drawXY(ctx, props) {
|
|
|
92
92
|
.toString())
|
|
93
93
|
: c;
|
|
94
94
|
const w = Math.max(rightPx - leftPx + fudgeFactor, minSize);
|
|
95
|
-
if (Math.floor(leftPx) !== Math.floor(prevLeftPx)
|
|
95
|
+
if (Math.floor(leftPx) !== Math.floor(prevLeftPx) ||
|
|
96
|
+
rightPx - leftPx > 1) {
|
|
96
97
|
reducedFeatures.push(feature);
|
|
97
98
|
prevLeftPx = leftPx;
|
|
98
99
|
}
|
|
@@ -131,7 +132,8 @@ function drawXY(ctx, props) {
|
|
|
131
132
|
start = performance.now();
|
|
132
133
|
}
|
|
133
134
|
const [leftPx, rightPx] = (0, util_1.featureSpanPx)(feature, region, bpPerPx);
|
|
134
|
-
if (Math.floor(leftPx) !== Math.floor(prevLeftPx)
|
|
135
|
+
if (Math.floor(leftPx) !== Math.floor(prevLeftPx) ||
|
|
136
|
+
rightPx - leftPx > 1) {
|
|
135
137
|
reducedFeatures.push(feature);
|
|
136
138
|
prevLeftPx = leftPx;
|
|
137
139
|
}
|
|
@@ -183,5 +185,7 @@ function drawXY(ctx, props) {
|
|
|
183
185
|
ctx.stroke();
|
|
184
186
|
}
|
|
185
187
|
}
|
|
186
|
-
return {
|
|
188
|
+
return {
|
|
189
|
+
reducedFeatures,
|
|
190
|
+
};
|
|
187
191
|
}
|
|
@@ -13,7 +13,11 @@ const TooltipContents = forwardRef(function TooltipContents2({ model, feature },
|
|
|
13
13
|
const source = feature.get('source');
|
|
14
14
|
const summary = feature.get('summary');
|
|
15
15
|
const obj = Object.fromEntries(model.sources.map(ent => [ent.name, ent]));
|
|
16
|
-
return (_jsxs("div", { ref: ref, children: [[refName, coord].filter(f => !!f).join(':'), _jsx("br", {}), sources ? (_jsxs("table", { children: [_jsx("thead", { children: _jsxs("tr", { children: [_jsx("th", { children: "color" }), _jsx("th", { children: "source" }), _jsx("th", { children: "score" })] }) }), _jsx("tbody", { children: Object.entries(sources).map(([source, data]) => (_jsxs("tr", { children: [_jsx("td", {
|
|
16
|
+
return (_jsxs("div", { ref: ref, children: [[refName, coord].filter(f => !!f).join(':'), _jsx("br", {}), sources ? (_jsxs("table", { children: [_jsx("thead", { children: _jsxs("tr", { children: [_jsx("th", { children: "color" }), _jsx("th", { children: "source" }), _jsx("th", { children: "score" })] }) }), _jsx("tbody", { children: Object.entries(sources).map(([source, data]) => (_jsxs("tr", { children: [_jsx("td", { children: _jsx("div", { style: {
|
|
17
|
+
width: 16,
|
|
18
|
+
height: 16,
|
|
19
|
+
background: obj[source].color,
|
|
20
|
+
} }) }), _jsx("td", { children: source }), _jsx("td", { children: toP(data.score) })] }, source))) })] })) : (_jsxs("span", { children: [source, ' ', summary
|
|
17
21
|
? `min:${toP(feature.get('minScore'))} avg:${toP(feature.get('score'))} max:${toP(feature.get('maxScore'))}`
|
|
18
22
|
: toP(feature.get('score'))] }))] }));
|
|
19
23
|
});
|
|
@@ -16,7 +16,7 @@ const Wrapper = observer(function ({ children, model, exportSVG, }) {
|
|
|
16
16
|
});
|
|
17
17
|
export const YScaleBars = observer(function (props) {
|
|
18
18
|
const { model, orientation, exportSVG } = props;
|
|
19
|
-
const { stats, needsFullHeightScalebar, sources } = model;
|
|
20
|
-
return stats && sources ? (_jsx(Wrapper, { ...props, children: needsFullHeightScalebar ? (_jsx(FullHeightScaleBar, { model: model, orientation: orientation, exportSVG: exportSVG })) : (_jsx(IndividualScaleBars, { model: model, orientation: orientation, exportSVG: exportSVG })) })) : null;
|
|
19
|
+
const { showSidebar, stats, needsFullHeightScalebar, sources } = model;
|
|
20
|
+
return stats && sources ? (_jsx(Wrapper, { ...props, children: showSidebar ? (needsFullHeightScalebar ? (_jsx(FullHeightScaleBar, { model: model, orientation: orientation, exportSVG: exportSVG })) : (_jsx(IndividualScaleBars, { model: model, orientation: orientation, exportSVG: exportSVG }))) : null })) : null;
|
|
21
21
|
});
|
|
22
22
|
export default YScaleBars;
|
|
@@ -101,6 +101,7 @@ export declare function stateModelFactory(_pluginManager: PluginManager, configS
|
|
|
101
101
|
} & {
|
|
102
102
|
type: import("mobx-state-tree").ISimpleType<"MultiLinearWiggleDisplay">;
|
|
103
103
|
layout: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IType<Source[], Source[], Source[]>, [undefined]>;
|
|
104
|
+
showSidebar: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
104
105
|
}, {
|
|
105
106
|
rendererTypeName: string;
|
|
106
107
|
error: unknown;
|
|
@@ -327,6 +328,7 @@ export declare function stateModelFactory(_pluginManager: PluginManager, configS
|
|
|
327
328
|
featureUnderMouseVolatile: Feature | undefined;
|
|
328
329
|
sourcesVolatile: Source[] | undefined;
|
|
329
330
|
} & {
|
|
331
|
+
setShowSidebar(arg: boolean): void;
|
|
330
332
|
setSourcesLoading(str: string): void;
|
|
331
333
|
setLayout(layout: Source[]): void;
|
|
332
334
|
clearLayout(): void;
|
|
@@ -24,6 +24,7 @@ export function stateModelFactory(_pluginManager, configSchema) {
|
|
|
24
24
|
.compose('MultiLinearWiggleDisplay', SharedWiggleMixin(configSchema), types.model({
|
|
25
25
|
type: types.literal('MultiLinearWiggleDisplay'),
|
|
26
26
|
layout: types.optional(types.frozen(), []),
|
|
27
|
+
showSidebar: true,
|
|
27
28
|
}))
|
|
28
29
|
.volatile(() => ({
|
|
29
30
|
sourcesLoadingStopToken: undefined,
|
|
@@ -31,6 +32,9 @@ export function stateModelFactory(_pluginManager, configSchema) {
|
|
|
31
32
|
sourcesVolatile: undefined,
|
|
32
33
|
}))
|
|
33
34
|
.actions(self => ({
|
|
35
|
+
setShowSidebar(arg) {
|
|
36
|
+
self.showSidebar = arg;
|
|
37
|
+
},
|
|
34
38
|
setSourcesLoading(str) {
|
|
35
39
|
if (self.sourcesLoadingStopToken) {
|
|
36
40
|
stopStopToken(self.sourcesLoadingStopToken);
|
|
@@ -314,6 +318,14 @@ export function stateModelFactory(_pluginManager, configSchema) {
|
|
|
314
318
|
]);
|
|
315
319
|
},
|
|
316
320
|
},
|
|
321
|
+
{
|
|
322
|
+
label: 'Show sidebar',
|
|
323
|
+
type: 'checkbox',
|
|
324
|
+
checked: self.showSidebar,
|
|
325
|
+
onClick: () => {
|
|
326
|
+
self.setShowSidebar(!self.showSidebar);
|
|
327
|
+
},
|
|
328
|
+
},
|
|
317
329
|
{
|
|
318
330
|
label: 'Edit colors/arrangement...',
|
|
319
331
|
onClick: () => {
|
|
@@ -33,7 +33,7 @@ export default abstract class WiggleBaseRenderer extends FeatureRendererType {
|
|
|
33
33
|
height: number;
|
|
34
34
|
width: number;
|
|
35
35
|
containsNoTransferables: boolean;
|
|
36
|
-
canvasRecordedData:
|
|
36
|
+
canvasRecordedData: Record<string, unknown>;
|
|
37
37
|
reactElement?: React.ReactElement;
|
|
38
38
|
html?: string;
|
|
39
39
|
} | {
|
|
@@ -41,15 +41,15 @@ export default abstract class WiggleBaseRenderer extends FeatureRendererType {
|
|
|
41
41
|
height: number;
|
|
42
42
|
width: number;
|
|
43
43
|
containsNoTransferables: boolean;
|
|
44
|
-
|
|
44
|
+
imageData: any;
|
|
45
|
+
reactElement?: React.ReactElement;
|
|
45
46
|
html?: string;
|
|
46
47
|
} | {
|
|
47
48
|
features: Map<string, Feature>;
|
|
48
49
|
height: number;
|
|
49
50
|
width: number;
|
|
50
51
|
containsNoTransferables: boolean;
|
|
51
|
-
|
|
52
|
-
reactElement?: React.ReactElement;
|
|
52
|
+
reactElement: React.ReactElement;
|
|
53
53
|
html?: string;
|
|
54
54
|
}>;
|
|
55
55
|
abstract draw<T extends RenderArgsDeserializedWithFeatures>(ctx: CanvasRenderingContext2D, props: T): Promise<Record<string, unknown> | undefined>;
|
package/esm/drawDensity.js
CHANGED
|
@@ -36,15 +36,21 @@ export function drawDensity(ctx, props) {
|
|
|
36
36
|
start = performance.now();
|
|
37
37
|
}
|
|
38
38
|
const [leftPx, rightPx] = featureSpanPx(feature, region, bpPerPx);
|
|
39
|
-
if (Math.floor(leftPx) !== Math.floor(prevLeftPx)) {
|
|
39
|
+
if (Math.floor(leftPx) !== Math.floor(prevLeftPx) || rightPx - leftPx > 1) {
|
|
40
40
|
reducedFeatures.push(feature);
|
|
41
41
|
prevLeftPx = leftPx;
|
|
42
42
|
}
|
|
43
43
|
const score = feature.get('score');
|
|
44
44
|
hasClipping = hasClipping || score > niceMax || score < niceMin;
|
|
45
45
|
const w = rightPx - leftPx + fudgeFactor;
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
if (score >= scaleOpts.domain[0]) {
|
|
47
|
+
ctx.fillStyle = cb(feature, score);
|
|
48
|
+
ctx.fillRect(leftPx, 0, w, height);
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
ctx.fillStyle = '#eee';
|
|
52
|
+
ctx.fillRect(leftPx, 0, w, height);
|
|
53
|
+
}
|
|
48
54
|
}
|
|
49
55
|
ctx.save();
|
|
50
56
|
if (hasClipping) {
|
|
@@ -66,5 +72,7 @@ export function drawDensity(ctx, props) {
|
|
|
66
72
|
}
|
|
67
73
|
}
|
|
68
74
|
ctx.restore();
|
|
69
|
-
return {
|
|
75
|
+
return {
|
|
76
|
+
reducedFeatures,
|
|
77
|
+
};
|
|
70
78
|
}
|
package/esm/drawLine.js
CHANGED
|
@@ -25,7 +25,7 @@ export function drawLine(ctx, props) {
|
|
|
25
25
|
start = performance.now();
|
|
26
26
|
}
|
|
27
27
|
const [leftPx, rightPx] = featureSpanPx(feature, region, bpPerPx);
|
|
28
|
-
if (Math.floor(leftPx) !== Math.floor(prevLeftPx)) {
|
|
28
|
+
if (Math.floor(leftPx) !== Math.floor(prevLeftPx) || rightPx - leftPx > 1) {
|
|
29
29
|
reducedFeatures.push(feature);
|
|
30
30
|
prevLeftPx = leftPx;
|
|
31
31
|
}
|
|
@@ -68,5 +68,7 @@ export function drawLine(ctx, props) {
|
|
|
68
68
|
ctx.stroke();
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
|
-
return {
|
|
71
|
+
return {
|
|
72
|
+
reducedFeatures,
|
|
73
|
+
};
|
|
72
74
|
}
|
package/esm/drawXY.js
CHANGED
|
@@ -89,7 +89,8 @@ export function drawXY(ctx, props) {
|
|
|
89
89
|
.toString())
|
|
90
90
|
: c;
|
|
91
91
|
const w = Math.max(rightPx - leftPx + fudgeFactor, minSize);
|
|
92
|
-
if (Math.floor(leftPx) !== Math.floor(prevLeftPx)
|
|
92
|
+
if (Math.floor(leftPx) !== Math.floor(prevLeftPx) ||
|
|
93
|
+
rightPx - leftPx > 1) {
|
|
93
94
|
reducedFeatures.push(feature);
|
|
94
95
|
prevLeftPx = leftPx;
|
|
95
96
|
}
|
|
@@ -128,7 +129,8 @@ export function drawXY(ctx, props) {
|
|
|
128
129
|
start = performance.now();
|
|
129
130
|
}
|
|
130
131
|
const [leftPx, rightPx] = featureSpanPx(feature, region, bpPerPx);
|
|
131
|
-
if (Math.floor(leftPx) !== Math.floor(prevLeftPx)
|
|
132
|
+
if (Math.floor(leftPx) !== Math.floor(prevLeftPx) ||
|
|
133
|
+
rightPx - leftPx > 1) {
|
|
132
134
|
reducedFeatures.push(feature);
|
|
133
135
|
prevLeftPx = leftPx;
|
|
134
136
|
}
|
|
@@ -180,5 +182,7 @@ export function drawXY(ctx, props) {
|
|
|
180
182
|
ctx.stroke();
|
|
181
183
|
}
|
|
182
184
|
}
|
|
183
|
-
return {
|
|
185
|
+
return {
|
|
186
|
+
reducedFeatures,
|
|
187
|
+
};
|
|
184
188
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jbrowse/plugin-wiggle",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.5.0",
|
|
4
4
|
"description": "JBrowse 2 wiggle adapters, tracks, etc.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jbrowse",
|
|
@@ -36,10 +36,10 @@
|
|
|
36
36
|
"clean": "rimraf dist esm *.tsbuildinfo"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@gmod/bbi": "^
|
|
40
|
-
"@jbrowse/core": "^3.
|
|
41
|
-
"@jbrowse/plugin-data-management": "^3.
|
|
42
|
-
"@jbrowse/plugin-linear-genome-view": "^3.
|
|
39
|
+
"@gmod/bbi": "^7.0.0",
|
|
40
|
+
"@jbrowse/core": "^3.5.0",
|
|
41
|
+
"@jbrowse/plugin-data-management": "^3.5.0",
|
|
42
|
+
"@jbrowse/plugin-linear-genome-view": "^3.5.0",
|
|
43
43
|
"@mui/icons-material": "^7.0.0",
|
|
44
44
|
"@mui/material": "^7.0.0",
|
|
45
45
|
"@mui/x-charts-vendor": "^8.0.0",
|
|
@@ -62,5 +62,5 @@
|
|
|
62
62
|
"distModule": "esm/index.js",
|
|
63
63
|
"srcModule": "src/index.ts",
|
|
64
64
|
"module": "esm/index.js",
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "8a8aa0aab2229dece106a5715a767e649e2fe92b"
|
|
66
66
|
}
|