mirror of
https://github.com/scratchfoundation/scratch-paint.git
synced 2024-12-22 21:42:30 -05:00
Fix gradient outlines with 0 width in select mode
Previously, if you selected a shape with a gradient outline that had a width of 0, its outline color wouldn't be null when it should have been.
This commit is contained in:
parent
98daa5ee5d
commit
852eefc2d7
1 changed files with 9 additions and 3 deletions
|
@ -421,12 +421,18 @@ const getColorsFromSelection = function (selectedItems, bitmapMode) {
|
|||
}
|
||||
}
|
||||
if (item.strokeColor) {
|
||||
|
||||
if (item.strokeColor.type === 'gradient') {
|
||||
const {primary, secondary, gradientType} = _colorStateFromGradient(item.strokeColor.gradient);
|
||||
const strokeColorString = primary;
|
||||
|
||||
let strokeColorString = primary;
|
||||
const strokeColor2String = secondary;
|
||||
const strokeGradientType = gradientType;
|
||||
let strokeGradientType = gradientType;
|
||||
|
||||
// If the item's stroke width is 0, pretend the stroke color is null
|
||||
if (!item.strokeWidth) {
|
||||
strokeColorString = null;
|
||||
strokeGradientType = GradientTypes.SOLID;
|
||||
}
|
||||
|
||||
// Stroke color is fill color in bitmap
|
||||
if (bitmapMode) {
|
||||
|
|
Loading…
Reference in a new issue