mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-10-07 15:48:13 +08:00
red lines on canvas for testing
This commit is contained in:
@@ -19,11 +19,18 @@ const drawLinesCanvas = (
|
|||||||
colorScale,
|
colorScale,
|
||||||
) => {
|
) => {
|
||||||
return (d) => {
|
return (d) => {
|
||||||
|
|
||||||
|
|
||||||
if (colorAccessor && colorScale) {
|
if (colorAccessor && colorScale) {
|
||||||
ctx.strokeStyle = d3.interpolateViridis(colorScale(d[colorAccessor]));
|
ctx.strokeStyle = d3.interpolateViridis(colorScale(d[colorAccessor]));
|
||||||
} else {
|
} else {
|
||||||
ctx.strokeStyle = "rgba(0,0,0,1)";
|
ctx.strokeStyle = "rgba(0,0,0,1)";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (d["__selected__"]) {
|
||||||
|
ctx.strokeStyle = "rgb(255,0,0)";
|
||||||
|
}
|
||||||
|
|
||||||
ctx.beginPath();
|
ctx.beginPath();
|
||||||
var coords = project(d, dimensions, xscale);
|
var coords = project(d, dimensions, xscale);
|
||||||
coords.forEach((p,i) => {
|
coords.forEach((p,i) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user