mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-05-01 22:35:29 +08:00
Apply base View properties (scale, alpha etc) to FlatShadowNode when it maps to a View
Summary: @public There are some properties that we want to handle on a View level, as opposed to a FlatShadowNode level. For example, scale or alpha, that can be done very efficiently in hardware. Once we pop FlatShadowNode to a separate View, we need to apply these properties. This is where `BaseViewManager` comes in handy. Reviewed By: sriramramani Differential Revision: D2694290
This commit is contained in:
committed by
Ahmed El-Helw
parent
dad378e394
commit
b8b4fb8a74
@@ -80,7 +80,11 @@ public class FlatUIImplementation extends UIImplementation {
|
||||
ReactShadowNode cssNode,
|
||||
int rootViewTag,
|
||||
CatalystStylesDiffMap styles) {
|
||||
// nothing to do yet.
|
||||
int tag = cssNode.getReactTag();
|
||||
FlatShadowNode node = (FlatShadowNode) cssNode;
|
||||
if (node.mountsToView()) {
|
||||
mStateBuilder.ensureBackingViewIsCreated(node, tag, styles);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -88,7 +92,11 @@ public class FlatUIImplementation extends UIImplementation {
|
||||
ReactShadowNode cssNode,
|
||||
String className,
|
||||
CatalystStylesDiffMap styles) {
|
||||
// nothing to do yet.
|
||||
int tag = cssNode.getReactTag();
|
||||
FlatShadowNode node = (FlatShadowNode) cssNode;
|
||||
if (node.mountsToView()) {
|
||||
mStateBuilder.ensureBackingViewIsCreated(node, tag, styles);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user