diff --git a/ReactWindows/ReactNative/Views/Text/ReactSpanShadowNode.cs b/ReactWindows/ReactNative/Views/Text/ReactSpanShadowNode.cs
index a3987563e0d..5e3c3e99bf9 100644
--- a/ReactWindows/ReactNative/Views/Text/ReactSpanShadowNode.cs
+++ b/ReactWindows/ReactNative/Views/Text/ReactSpanShadowNode.cs
@@ -127,5 +127,23 @@ public override void UpdateInline(Inline inline)
inline.FontWeight = _fontWeight ?? FontWeights.Normal;
inline.FontFamily = _fontFamily != null ? new FontFamily(_fontFamily) : FontFamily.XamlAutoFontFamily;
}
+
+ ///
+ /// This method will be called by once
+ /// per batch, before calculating layout. This will only be called for
+ /// nodes that are marked as updated with or
+ /// require layout (i.e., marked with ).
+ ///
+ public override void OnBeforeLayout()
+ {
+ // Run flexbox on the children which are inline views.
+ foreach (var child in this.Children)
+ {
+ if (!(child is ReactRunShadowNode) && !(child is ReactSpanShadowNode))
+ {
+ child.CalculateLayout();
+ }
+ }
+ }
}
}
diff --git a/ReactWindows/ReactNative/Views/Text/ReactTextShadowNode.cs b/ReactWindows/ReactNative/Views/Text/ReactTextShadowNode.cs
index f8c5114b2f7..54904867a08 100644
--- a/ReactWindows/ReactNative/Views/Text/ReactTextShadowNode.cs
+++ b/ReactWindows/ReactNative/Views/Text/ReactTextShadowNode.cs
@@ -267,5 +267,23 @@ private void UpdateTextBlockCore(RichTextBlock textBlock, bool measureOnly)
0);
}
}
+
+ ///
+ /// This method will be called by once
+ /// per batch, before calculating layout. This will only be called for
+ /// nodes that are marked as updated with or
+ /// require layout (i.e., marked with ).
+ ///
+ public override void OnBeforeLayout()
+ {
+ // Run flexbox on the children which are inline views.
+ foreach (var child in this.Children)
+ {
+ if (!(child is ReactRunShadowNode) && !(child is ReactSpanShadowNode))
+ {
+ child.CalculateLayout();
+ }
+ }
+ }
}
}
diff --git a/ReactWindows/ReactNative/project.json b/ReactWindows/ReactNative/project.json
index 50d9381dc25..7de5c44ed6d 100644
--- a/ReactWindows/ReactNative/project.json
+++ b/ReactWindows/ReactNative/project.json
@@ -1,6 +1,6 @@
{
"dependencies": {
- "Facebook.CSSLayout": "2.0.0-pre",
+ "Facebook.CSSLayout": "2.0.1-pre",
"Microsoft.NETCore.UniversalWindowsPlatform": "5.0.0",
"Newtonsoft.Json": "7.0.1",
"Rx-Xaml": "2.2.5",