mirror of
https://github.com/status-im/react-native.git
synced 2025-02-28 09:00:55 +00:00
Rename mIsOverflowVisible to a more descriptive mClipToBounds
Summary: A simple refactoring diff that should make code a little easier to read. No functional changes. Reviewed By: ahmedre Differential Revision: D2867718
This commit is contained in:
parent
a52c89b01d
commit
74c72111f1
@ -48,7 +48,7 @@ import com.facebook.react.uimanager.ViewProps;
|
|||||||
private @Nullable DrawView mDrawView;
|
private @Nullable DrawView mDrawView;
|
||||||
private @Nullable DrawBackgroundColor mDrawBackground;
|
private @Nullable DrawBackgroundColor mDrawBackground;
|
||||||
private int mMoveToIndexInParent;
|
private int mMoveToIndexInParent;
|
||||||
private boolean mIsOverflowVisible = true;
|
private boolean mClipToBounds = false;
|
||||||
|
|
||||||
/* package */ void handleUpdateProperties(ReactStylesDiffMap styles) {
|
/* package */ void handleUpdateProperties(ReactStylesDiffMap styles) {
|
||||||
if (!mountsToView()) {
|
if (!mountsToView()) {
|
||||||
@ -101,12 +101,12 @@ import com.facebook.react.uimanager.ViewProps;
|
|||||||
|
|
||||||
@ReactProp(name = "overflow")
|
@ReactProp(name = "overflow")
|
||||||
public void setOverflow(String overflow) {
|
public void setOverflow(String overflow) {
|
||||||
mIsOverflowVisible = "visible".equals(overflow);
|
mClipToBounds = "hidden".equals(overflow);
|
||||||
invalidate();
|
invalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
public final boolean isOverflowVisible() {
|
public final boolean clipToBounds() {
|
||||||
return mIsOverflowVisible;
|
return mClipToBounds;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -375,7 +375,7 @@ import com.facebook.react.uimanager.events.EventDispatcher;
|
|||||||
|
|
||||||
node.collectState(this, left, top, right, bottom, clipLeft, clipTop, clipRight, clipBottom);
|
node.collectState(this, left, top, right, bottom, clipLeft, clipTop, clipRight, clipBottom);
|
||||||
|
|
||||||
if (node.isOverflowVisible()) {
|
if (!node.clipToBounds()) {
|
||||||
clipLeft = parentClipLeft;
|
clipLeft = parentClipLeft;
|
||||||
clipTop = parentClipTop;
|
clipTop = parentClipTop;
|
||||||
clipRight = parentClipRight;
|
clipRight = parentClipRight;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user