Swap child Yoga

Summary:
Changelog: [Internal]

Expose the replaceChild Yoga call to Java

Reviewed By: SidharthGuglani

Differential Revision: D19497193

fbshipit-source-id: 153243cc1d8c23dcaf2c772ca794bd59a230f652
This commit is contained in:
Pasquale Anatriello
2020-01-30 03:41:45 -08:00
committed by Facebook Github Bot
parent 7f97e8b232
commit e983c4a5ef
6 changed files with 92 additions and 22 deletions

View File

@@ -386,6 +386,14 @@ YOGA_EXPORT void YGNodeInsertChild(
owner->markDirtyAndPropogate();
}
YOGA_EXPORT void YGNodeSwapChild(
const YGNodeRef owner,
const YGNodeRef child,
const uint32_t index) {
owner->replaceChild(child, index);
child->setOwner(owner);
}
YOGA_EXPORT void YGNodeRemoveChild(
const YGNodeRef owner,
const YGNodeRef excludedChild) {