mirror of
https://github.com/status-im/react-native.git
synced 2025-01-28 18:25:06 +00:00
Fix default values for translateX/Y props.
Reviewed By: andreicoman11 Differential Revision: D2631186 fb-gh-sync-id: 8f898b11be31b253780474d1cf328d7d109decbb
This commit is contained in:
parent
86c1375c1a
commit
c6532a94a6
@ -113,13 +113,13 @@ public abstract class BaseViewManager<T extends View, C extends LayoutShadowNode
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated
|
@Deprecated
|
||||||
@ReactProp(name = PROP_TRANSLATE_X, defaultFloat = 1f)
|
@ReactProp(name = PROP_TRANSLATE_X, defaultFloat = 0f)
|
||||||
public void setTranslateX(T view, float translateX) {
|
public void setTranslateX(T view, float translateX) {
|
||||||
view.setTranslationX(PixelUtil.toPixelFromDIP(translateX));
|
view.setTranslationX(PixelUtil.toPixelFromDIP(translateX));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated
|
@Deprecated
|
||||||
@ReactProp(name = PROP_TRANSLATE_Y, defaultFloat = 1f)
|
@ReactProp(name = PROP_TRANSLATE_Y, defaultFloat = 0f)
|
||||||
public void setTranslateY(T view, float translateY) {
|
public void setTranslateY(T view, float translateY) {
|
||||||
view.setTranslationY(PixelUtil.toPixelFromDIP(translateY));
|
view.setTranslationY(PixelUtil.toPixelFromDIP(translateY));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user