Skip to content

Commit

Permalink
fix(android)!: pivot point for RN transform array syntax
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Makes android specific transform origin adjustments
 unnecessary / broken. Renders exactly the same as web and ios instead.
  • Loading branch information
msand committed Jan 15, 2020
1 parent d12b01c commit db682f8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions android/src/main/java/com/horcrux/svg/RenderableView.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ abstract public class RenderableView extends VirtualView {

RenderableView(ReactContext reactContext) {
super(reactContext);
setPivotX(0);
setPivotY(0);
}

static RenderableView contextElement;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -380,8 +380,8 @@ private static void setTransformProperty(View view, ReadableArray transforms) {
}

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);
Expand Down

0 comments on commit db682f8

Please sign in to comment.