mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-05-02 23:05:01 +08:00
Add position information for DrawViews.
Summary: Previously, we had no information about the positioning of the view until after we had attached it. We have the position information attached to the shadow node, but this attaches it to the DrawView as well. It also removes the need for AbstractClippingDrawCommand. Reviewed By: ahmedre Differential Revision: D3609092
This commit is contained in:
committed by
Ahmed El-Helw
parent
ba56043715
commit
498fc63952
@@ -536,6 +536,10 @@ import com.facebook.react.uimanager.events.EventDispatcher;
|
||||
addNativeChild(node);
|
||||
if (!parentIsAndroidView) {
|
||||
mDrawCommands.add(node.collectDrawView(
|
||||
left,
|
||||
top,
|
||||
right,
|
||||
bottom,
|
||||
parentClipLeft,
|
||||
parentClipTop,
|
||||
parentClipRight,
|
||||
@@ -544,8 +548,8 @@ import com.facebook.react.uimanager.events.EventDispatcher;
|
||||
|
||||
updated = collectStateForMountableNode(
|
||||
node,
|
||||
left - left,
|
||||
top - top,
|
||||
0, // left - left
|
||||
0, // top - top
|
||||
right - left,
|
||||
bottom - top,
|
||||
parentClipLeft - left,
|
||||
|
||||
Reference in New Issue
Block a user