Skip to content

Commit

Permalink
Fix export SVG crash on some BigWig tracks (#3057)
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdcolin committed Jun 24, 2022
1 parent 1fbc3c1 commit 6c7c106
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions plugins/wiggle/src/XYPlotRenderer/XYPlotRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function fillRect(
color?: string,
) {
if (color) {
ctx.fillStyle = color
ctx.fillStyle = String(color)
}
if (width < 0) {
x += width
Expand Down Expand Up @@ -123,12 +123,11 @@ export default class XYPlotRenderer extends WiggleBaseRenderer {
filled ? toHeight(maxr) - toHeight(score) : 1,
crossingOrigin
? colorCallback(feature, maxr)
: Color(c).lighten(0.6).toString(),
: Color(c).lighten(0.6),
)
}

// normal

fillRect(
ctx,
leftPx,
Expand All @@ -152,7 +151,7 @@ export default class XYPlotRenderer extends WiggleBaseRenderer {
filled ? toHeight(minr) : 1,
crossingOrigin
? colorCallback(feature, minr)
: Color(c).darken(0.6).toString(),
: Color(c).darken(0.6),
)
}
} else {
Expand Down

0 comments on commit 6c7c106

Please sign in to comment.