Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions ReactWindows/ReactNative/Views/Text/ReactSpanShadowNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -127,5 +127,23 @@ public override void UpdateInline(Inline inline)
inline.FontWeight = _fontWeight ?? FontWeights.Normal;
inline.FontFamily = _fontFamily != null ? new FontFamily(_fontFamily) : FontFamily.XamlAutoFontFamily;
}

/// <summary>
/// This method will be called by <see cref="UIManagerModule"/> once
/// per batch, before calculating layout. This will only be called for
/// nodes that are marked as updated with <see cref="MarkUpdated"/> or
/// require layout (i.e., marked with <see cref="dirty"/>).
/// </summary>
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();
}
}
}
}
}
18 changes: 18 additions & 0 deletions ReactWindows/ReactNative/Views/Text/ReactTextShadowNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -267,5 +267,23 @@ private void UpdateTextBlockCore(RichTextBlock textBlock, bool measureOnly)
0);
}
}

/// <summary>
/// This method will be called by <see cref="UIManagerModule"/> once
/// per batch, before calculating layout. This will only be called for
/// nodes that are marked as updated with <see cref="MarkUpdated"/> or
/// require layout (i.e., marked with <see cref="dirty"/>).
/// </summary>
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();
}
}
}
}
}
2 changes: 1 addition & 1 deletion ReactWindows/ReactNative/project.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down