Skip to content

Commit e74c09c

Browse files
Merged PR 52129: Fix for state elements
Fix for state elements
1 parent 0431f5f commit e74c09c

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

Editor/FigmaParser.cs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -999,14 +999,15 @@ void AddBackgroundImageForVectorNode()
999999
}
10001000
void AddBorderWidth()
10011001
{
1002+
bool state = IsStateNode(mixin.As<BaseNodeMixin>());
10021003
if (mixin.individualStrokeWeights is not null)
10031004
{
1004-
if (mixin.individualStrokeWeights.left > 0) borderLeftWidth = mixin.individualStrokeWeights.left;
1005-
if (mixin.individualStrokeWeights.right > 0) borderRightWidth = mixin.individualStrokeWeights.right;
1006-
if (mixin.individualStrokeWeights.top > 0) borderTopWidth = mixin.individualStrokeWeights.top;
1007-
if (mixin.individualStrokeWeights.bottom > 0) borderBottomWidth = mixin.individualStrokeWeights.bottom;
1005+
if (mixin.individualStrokeWeights.left > 0 || state) borderLeftWidth = mixin.individualStrokeWeights.left;
1006+
if (mixin.individualStrokeWeights.right > 0 || state) borderRightWidth = mixin.individualStrokeWeights.right;
1007+
if (mixin.individualStrokeWeights.top > 0 || state) borderTopWidth = mixin.individualStrokeWeights.top;
1008+
if (mixin.individualStrokeWeights.bottom > 0 || state) borderBottomWidth = mixin.individualStrokeWeights.bottom;
10081009
}
1009-
else if (mixin.strokeWeight > 0) borderWidth = mixin.strokeWeight;
1010+
else if (mixin.strokeWeight > 0 || state) borderWidth = mixin.strokeWeight;
10101011
}
10111012
void AddBorderRadius(RectangleCornerMixin rectangleCornerMixin, CornerMixin cornerMixin)
10121013
{

0 commit comments

Comments
 (0)