mirror of
https://github.com/scratchfoundation/scratch-paint.git
synced 2025-01-08 13:42:00 -05:00
Enforce minimum gradient width for fill tool
This commit is contained in:
parent
cca0832f0d
commit
379599905a
1 changed files with 8 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue