From 036ae27a824c900a78291daa939b26c419f1cbe9 Mon Sep 17 00:00:00 2001 From: DCloud_LXH <283700113@qq.com> Date: Mon, 16 Aug 2021 18:51:03 +0800 Subject: [PATCH] fix: canvas createPattern --- src/core/service/api/context/canvas.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/core/service/api/context/canvas.js b/src/core/service/api/context/canvas.js index 1bb2fc128..447243d1e 100644 --- a/src/core/service/api/context/canvas.js +++ b/src/core/service/api/context/canvas.js @@ -231,8 +231,9 @@ function checkColor (e) { } function Pattern (image, repetition) { - this.image = image - this.repetition = repetition + this.type = 'pattern' + this.data = image + this.colorStop = repetition } class CanvasGradient { -- GitLab