Skip to content

Commit

Permalink
截屏 修复画笔初始化空值
Browse files Browse the repository at this point in the history
  • Loading branch information
xushengfeng committed Sep 27, 2024
1 parent ee7044c commit 89f66ca
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/renderer/clip/clip_window.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand All @@ -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");
}
Expand Down

0 comments on commit 89f66ca

Please sign in to comment.