From 89f66ca0512835e811acbc0790417d5bcecba251 Mon Sep 17 00:00:00 2001 From: xushengfeng Date: Fri, 27 Sep 2024 18:10:46 +0800 Subject: [PATCH] =?UTF-8?q?=E6=88=AA=E5=B1=8F=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E7=94=BB=E7=AC=94=E5=88=9D=E5=A7=8B=E5=8C=96=E7=A9=BA=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/clip/clip_window.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/renderer/clip/clip_window.ts b/src/renderer/clip/clip_window.ts index a8dfde07d..93937fbc0 100644 --- a/src/renderer/clip/clip_window.ts +++ b/src/renderer/clip/clip_window.ts @@ -2123,8 +2123,8 @@ function showBars(b: boolean) { } function pencilElClick() { fabricCanvas.freeDrawingBrush = new PencilBrush(fabricCanvas); - fabricCanvas.freeDrawingBrush.color = shapePro.free.sc; - fabricCanvas.freeDrawingBrush.width = shapePro.free.sw; + fabricCanvas.freeDrawingBrush.color = shapePro.free.sc || strokeColor; + fabricCanvas.freeDrawingBrush.width = shapePro.free.sw || strokeWidth; setDrawMode("stroke"); @@ -2134,12 +2134,12 @@ function eraserElClick() { // todo const eraser = new EraserBrush(fabricCanvas); fabricCanvas.freeDrawingBrush = eraser; - fabricCanvas.freeDrawingBrush.width = shapePro.eraser.sw; + fabricCanvas.freeDrawingBrush.width = shapePro.eraser.sw || strokeWidth; } function freeSprayElClick() { fabricCanvas.freeDrawingBrush = new SprayBrush(fabricCanvas); - fabricCanvas.freeDrawingBrush.color = shapePro.spray.sc; - fabricCanvas.freeDrawingBrush.width = shapePro.spray.sw; + fabricCanvas.freeDrawingBrush.color = shapePro.spray.sc || strokeColor; + fabricCanvas.freeDrawingBrush.width = shapePro.spray.sw || strokeWidth; setDrawMode("stroke"); }