Fix path effect styling in nodes workflow

Summary:
From task:
in Nodes today, styles (dashed and dotted) only work on borders if the view has rounded corners. this is incorrect as they should work even when we're drawing rectangular borders.

Looking at the current non-nodes code (https://fburl.com/474407319) we can see that whenever there is a pathstyle effect the non-nodes code treats the border as if it was rounded (note that mBorderStyle == null || mBorderStyle == BorderStyle.SOLID means NO path effect is applied).

To bring the Nodes code in line with the non-Nodes code we can simply do the same thing: if there is a path style effect draw it as if it was rounded.

Reviewed By: ahmedre

Differential Revision: D4054722
This commit is contained in:
Jonathan Lawlor 2016-10-21 10:22:33 -07:00 committed by Ahmed El-Helw
parent b74667e570
commit e909fc01c0
1 changed files with 1 additions and 1 deletions

View File

@ -172,7 +172,7 @@ import com.facebook.csslayout.Spacing;
@Override
protected void onDraw(Canvas canvas) {
if (getBorderRadius() >= 0.5f) {
if (getBorderRadius() >= 0.5f || getPathEffectForBorderStyle() != null) {
drawRoundedBorders(canvas);
} else {
drawRectangularBorders(canvas);