mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-06-04 07:25:53 +00:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user