From 12bacf055183015d10f7d0d988080a892510aa71 Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Thu, 1 Aug 2019 14:59:42 +0900 Subject: [PATCH] Fixed error with gradient --- desktop/sources/scripts/surface.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/desktop/sources/scripts/surface.js b/desktop/sources/scripts/surface.js index c4073e9..d97b2c5 100644 --- a/desktop/sources/scripts/surface.js +++ b/desktop/sources/scripts/surface.js @@ -33,7 +33,7 @@ function Surface (ronin) { context.beginPath() this.trace(shape, context) context.lineWidth = width - context.strokeStyle = `${color}` + context.strokeStyle = color.hex ? color.hex : color if (isText(shape)) { context.textAlign = shape.a context.font = `${shape.p}px ${shape.f}` @@ -54,7 +54,7 @@ function Surface (ronin) { this.fill = (shape, color, context = this.context) => { context.beginPath() - context.fillStyle = `${color}` + context.fillStyle = color.hex ? color.hex : color this.trace(shape, context) if (isText(shape)) { context.textAlign = shape.a