mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-02-11 22:32:38 +08:00
Introduce @ReactProp-enabled LayoutShadowNode as a baseclass for most of the shadow nodes.
Differential Revision: D2540232 fb-gh-sync-id: 6dfed70c8253973897f4e447377ec5561862da23
This commit is contained in:
committed by
facebook-github-bot-9
parent
9493e96e13
commit
589df04846
@@ -167,20 +167,13 @@ public class ReactShadowNode extends CSSNode {
|
||||
ViewManagersPropertyCache.getNativePropSettersForShadowNodeClass(getClass());
|
||||
ReadableMap propMap = props.mBackingMap;
|
||||
ReadableMapKeySeyIterator iterator = propMap.keySetIterator();
|
||||
// TODO(krzysztof): Remove missingSetters code once all views are migrated to @ReactProp
|
||||
boolean missingSetters = false;
|
||||
while (iterator.hasNextKey()) {
|
||||
String key = iterator.nextKey();
|
||||
ViewManagersPropertyCache.PropSetter setter = propSetters.get(key);
|
||||
if (setter != null) {
|
||||
setter.updateShadowNodeProp(this, props);
|
||||
} else {
|
||||
missingSetters = true;
|
||||
}
|
||||
}
|
||||
if (missingSetters) {
|
||||
updateShadowNode(props);
|
||||
}
|
||||
onAfterUpdateTransaction();
|
||||
}
|
||||
|
||||
@@ -188,11 +181,6 @@ public class ReactShadowNode extends CSSNode {
|
||||
// no-op
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public void updateShadowNode(CatalystStylesDiffMap styles) {
|
||||
BaseCSSPropertyApplicator.applyCSSProperties(this, styles);
|
||||
}
|
||||
|
||||
/**
|
||||
* Called after layout step at the end of the UI batch from {@link UIManagerModule}. May be used
|
||||
* to enqueue additional ui operations for the native view. Will only be called on nodes marked
|
||||
|
||||
Reference in New Issue
Block a user