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:
adroitwhiz 2020-07-28 08:27:38 -04:00
parent 98daa5ee5d
commit 852eefc2d7

View file

@ -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) {