Add YGLayoutGetMargin
Summary: Fix #326. I'll open another PR once this one gets accepted to add support for `YGLayoutGetBorder` 👌 Closes https://github.com/facebook/yoga/pull/335 Reviewed By: gkassabli Differential Revision: D4409399 Pulled By: emilsjolander fbshipit-source-id: 8153f6701cab60b55a485f6d2e0b9f7767481090
This commit is contained in:
committed by
Facebook Github Bot
parent
498a5980e8
commit
d70f289e73
@@ -434,6 +434,23 @@ namespace Facebook.Yoga
|
||||
});
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestLayoutMargin() {
|
||||
YogaNode node = new YogaNode();
|
||||
node.Width = 100;
|
||||
node.Height = 100;
|
||||
node.MarginStart = 1;
|
||||
node.MarginEnd = 2;
|
||||
node.MarginTop = 3;
|
||||
node.MarginBottom = 4;
|
||||
node.CalculateLayout();
|
||||
|
||||
Assert.AreEqual(1, node.LayoutMarginLeft);
|
||||
Assert.AreEqual(2, node.LayoutMarginRight);
|
||||
Assert.AreEqual(3, node.LayoutMarginTop);
|
||||
Assert.AreEqual(4, node.LayoutMarginBottom);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestLayoutPadding() {
|
||||
YogaNode node = new YogaNode();
|
||||
|
Reference in New Issue
Block a user