Fabric: Fixed lost YogaNode's context in YogaLayoutableShadowNode
Summary: We replace yogaNode with newly creaded (by Yoga) one. So, we have to set up context. Reviewed By: mdvacca Differential Revision: D7376345 fbshipit-source-id: 7926a10e3f057fc385e7731c354827aeb8245760
This commit is contained in:
parent
1bb6db36be
commit
8f9212b839
|
@ -31,7 +31,6 @@ SharedYogaConfig YogaLayoutableShadowNode::suitableYogaConfig() {
|
|||
return sharedYogaConfig;
|
||||
}
|
||||
|
||||
|
||||
YogaLayoutableShadowNode::YogaLayoutableShadowNode(
|
||||
const SharedYogaStylableProps &props,
|
||||
const SharedShadowNodeSharedList &children
|
||||
|
@ -198,6 +197,7 @@ void YogaLayoutableShadowNode::yogaNodeCloneCallbackConnector(YGNode *oldYogaNod
|
|||
assert(newShadowNode);
|
||||
|
||||
// And finally, we have to replace underline yoga node with the new one provided by Yoga.
|
||||
newYogaNode->setContext((void *)newShadowNode.get());
|
||||
newShadowNode->yogaNode_ = std::shared_ptr<YGNode>(newYogaNode);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue