mirror of
https://github.com/scratchfoundation/scratch-paint.git
synced 2025-07-07 02:25:03 -04: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) {
|
||||||
|
|
||||||
if (item.strokeColor.type === 'gradient') {
|
if (item.strokeColor.type === 'gradient') {
|
||||||
const {primary, secondary, gradientType} = _colorStateFromGradient(item.strokeColor.gradient);
|
const {primary, secondary, gradientType} = _colorStateFromGradient(item.strokeColor.gradient);
|
||||||
const strokeColorString = primary;
|
|
||||||
|
let strokeColorString = primary;
|
||||||
const strokeColor2String = secondary;
|
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
|
// Stroke color is fill color in bitmap
|
||||||
if (bitmapMode) {
|
if (bitmapMode) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue