From 379599905aa61df751d2dbd90bb5165a14f2ea6b Mon Sep 17 00:00:00 2001 From: adroitwhiz Date: Tue, 28 Jul 2020 16:01:49 -0400 Subject: [PATCH] Enforce minimum gradient width for fill tool --- src/helper/tools/fill-tool.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/helper/tools/fill-tool.js b/src/helper/tools/fill-tool.js index 05bb998e..a34638b7 100644 --- a/src/helper/tools/fill-tool.js +++ b/src/helper/tools/fill-tool.js @@ -203,7 +203,14 @@ class FillTool extends paper.Tool { // Only create a gradient if specifically requested, else use color1 directly // This ensures we do not set a gradient by accident (see scratch-paint#830). if (gradientType && gradientType !== GradientTypes.SOLID) { - item[colorProp] = createGradientObject(color1, color2, gradientType, item.bounds, pointerLocation); + item[colorProp] = createGradientObject( + color1, + color2, + gradientType, + item.bounds, + pointerLocation, + item.strokeWidth + ); } else { item[colorProp] = color1; }