From 3016fb4a0f23764a80611e58d738f3ffae651862 Mon Sep 17 00:00:00 2001 From: Horcrux Date: Fri, 2 Sep 2016 10:53:26 +0800 Subject: [PATCH] bump version to 4.2.1 --- .../src/main/java/com/horcrux/svg/RNSVGSvgView.java | 12 ++++++------ package.json | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/android/src/main/java/com/horcrux/svg/RNSVGSvgView.java b/android/src/main/java/com/horcrux/svg/RNSVGSvgView.java index fbaca806..5f027a93 100644 --- a/android/src/main/java/com/horcrux/svg/RNSVGSvgView.java +++ b/android/src/main/java/com/horcrux/svg/RNSVGSvgView.java @@ -109,25 +109,25 @@ public class RNSVGSvgView extends ViewGroup { } private int getAbsoluteLeft(View view) { - int thisLeft = view.getLeft() - view.getScrollX(); + int left = view.getLeft() - view.getScrollX(); if (view.getParent() == view.getRootView() || view.getParent() instanceof ReactRootView) { - return thisLeft; + return left; } View parent = (View) view.getParent(); - return thisLeft + getAbsoluteLeft(parent); + return left + getAbsoluteLeft(parent); } private int getAbsoluteTop(View view) { - int thisTop = view.getTop() - view.getScrollY(); + int top = view.getTop() - view.getScrollY(); if (view.getParent() == view.getRootView() || view.getParent() instanceof ReactRootView) { - return thisTop; + return top; } View parent = (View) view.getParent(); - return thisTop + getAbsoluteTop(parent); + return top + getAbsoluteTop(parent); } private void dispatch(MotionEvent ev, TouchEventType type) { diff --git a/package.json b/package.json index a0c46014..eda26bcb 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "version": "4.2.0", + "version": "4.2.1", "name": "react-native-svg", "description": "SVG library for react-native", "repository": {