fix: radial gradient ry check (#2631)

This commit is contained in:
Niklas von Hertzen 2021-08-05 14:07:10 +08:00 committed by GitHub
parent b988d9d657
commit a0dd38a8be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -628,7 +628,7 @@ export class CanvasRenderer extends Renderer {
const y = getAbsoluteValue(position[position.length - 1], height);
const [rx, ry] = calculateRadius(backgroundImage, x, y, width, height);
if (rx > 0 && rx > 0) {
if (rx > 0 && ry > 0) {
const radialGradient = this.ctx.createRadialGradient(left + x, top + y, 0, left + x, top + y, rx);
processColorStops(backgroundImage.stops, rx * 2).forEach((colorStop) =>