fix(android)!: pivot point for RN transform array syntax

BREAKING CHANGE: Makes android specific transform origin adjustments
 unnecessary / broken. Renders exactly the same as web and ios instead.
This commit is contained in:
Mikael Sand
2020-01-15 02:03:59 +02:00
parent d12b01cbc2
commit db682f87bc
2 changed files with 4 additions and 2 deletions
@@ -41,6 +41,8 @@ abstract public class RenderableView extends VirtualView {
RenderableView(ReactContext reactContext) {
super(reactContext);
setPivotX(0);
setPivotY(0);
}
static RenderableView contextElement;
@@ -380,8 +380,8 @@ class RenderableViewManager extends ViewGroupManager<VirtualView> {
}
private static void resetTransformProperty(View view) {
view.setTranslationX(PixelUtil.toPixelFromDIP(0));
view.setTranslationY(PixelUtil.toPixelFromDIP(0));
view.setTranslationX(0);
view.setTranslationY(0);
view.setRotation(0);
view.setRotationX(0);
view.setRotationY(0);