Skip to content

Commit 0431f5f

Browse files
Merge pull request 52045 from feature/119398-weights into master
1 parent 40a3f23 commit 0431f5f

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

Editor/FigmaParser.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -999,7 +999,14 @@ void AddBackgroundImageForVectorNode()
999999
}
10001000
void AddBorderWidth()
10011001
{
1002-
borderWidth = mixin.strokeWeight;
1002+
if (mixin.individualStrokeWeights is not null)
1003+
{
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;
1008+
}
1009+
else if (mixin.strokeWeight > 0) borderWidth = mixin.strokeWeight;
10031010
}
10041011
void AddBorderRadius(RectangleCornerMixin rectangleCornerMixin, CornerMixin cornerMixin)
10051012
{

Editor/Interface/Figma.Types.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,8 @@ public interface GeometryMixin
360360
StrokeCap? strokeCap { get; set; }
361361
StrokeJoin? strokeJoin { get; set; }
362362
object[] strokeGeometry { get; set; }
363-
}
363+
IndividualStrokeWeights individualStrokeWeights { get; set; }
364+
}
364365

365366
public interface CornerMixin
366367
{

0 commit comments

Comments
 (0)