Generic solution for live editing

Summary: Preparation for making components live editable

Reviewed By: kevin0571

Differential Revision: D16379961

fbshipit-source-id: d0ea3d753eb588fe7b55f2345124427b4a5a58b5
This commit is contained in:
Roman Gorbunov
2019-07-25 03:59:05 -07:00
committed by Facebook Github Bot
parent cb374ffccd
commit f2bc5d3fb2
7 changed files with 139 additions and 14 deletions

View File

@@ -57,7 +57,7 @@ static CKFlexboxComponentChild findFlexboxLayoutParams(CKComponent *parent, CKCo
SKComponentLayoutWrapper *const wrapper =
[[SKComponentLayoutWrapper alloc] initWithLayout:layout
position:CGPointMake(0, 0)
parentKey:[NSString stringWithFormat: @"%p.", layout.component]
parentKey:[NSString stringWithFormat: @"%d.", layout.component.treeNode.nodeIdentifier]
reuseWrapper:reuseWrapper
rootNode: root];
// Cache the result.
@@ -97,7 +97,7 @@ static CKFlexboxComponentChild findFlexboxLayoutParams(CKComponent *parent, CKCo
position:child.position
parentKey:[_identifier stringByAppendingFormat:@"[%d].", index++]
reuseWrapper:reuseWrapper
rootNode: nil
rootNode:node
];
childWrapper->_isFlexboxChild = [_component isKindOfClass:[CKFlexboxComponent class]];
childWrapper->_flexboxChild = findFlexboxLayoutParams(_component, child.layout.component);