From 9a07c4251dc50d9aad92535d19d690b75f55e337 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E9=98=B3?= Date: Tue, 2 May 2017 11:56:03 +0800 Subject: [PATCH 1/3] Fix polypoints RegExp. Close #303 --- lib/extract/extractPolyPoints.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/extract/extractPolyPoints.js b/lib/extract/extractPolyPoints.js index 56c573f9..d3f1d503 100644 --- a/lib/extract/extractPolyPoints.js +++ b/lib/extract/extractPolyPoints.js @@ -1,4 +1,4 @@ export default function (polyPoints) { - return polyPoints.replace(/-/, ' -').split(/(?:\s+|\s*,\s*)/g).join(' '); + return polyPoints.replace(/[^e]-/, ' -').split(/(?:\s+|\s*,\s*)/g).join(' '); } From 2fd178da2872a169e13100308e0cff524197e26a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E9=98=B3?= Date: Tue, 2 May 2017 11:56:58 +0800 Subject: [PATCH 2/3] Fix #322, Close #316 --- android/src/main/java/com/horcrux/svg/SvgView.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/android/src/main/java/com/horcrux/svg/SvgView.java b/android/src/main/java/com/horcrux/svg/SvgView.java index 8170d1eb..f2ccb1b3 100644 --- a/android/src/main/java/com/horcrux/svg/SvgView.java +++ b/android/src/main/java/com/horcrux/svg/SvgView.java @@ -47,6 +47,7 @@ public class SvgView extends View { private @Nullable Bitmap mBitmap; private EventDispatcher mEventDispatcher; + private long mGestureStartTime = TouchEvent.UNSET; private int mTargetTag; private final TouchEventCoalescingKeyHelper mTouchEventCoalescingKeyHelper = @@ -124,6 +125,7 @@ public class SvgView extends View { mTargetTag, type, ev, + mGestureStartTime, ev.getX(), ev.getY(), mTouchEventCoalescingKeyHelper)); @@ -132,6 +134,7 @@ public class SvgView extends View { public void handleTouchEvent(MotionEvent ev) { int action = ev.getAction() & MotionEvent.ACTION_MASK; if (action == MotionEvent.ACTION_DOWN) { + mGestureStartTime = ev.getEventTime(); dispatch(ev, TouchEventType.START); } else if (mTargetTag == -1) { // All the subsequent action types are expected to be called after ACTION_DOWN thus target @@ -155,9 +158,11 @@ public class SvgView extends View { // Exactly onw of the pointers goes up dispatch(ev, TouchEventType.END); mTargetTag = -1; + mGestureStartTime = TouchEvent.UNSET; } else if (action == MotionEvent.ACTION_CANCEL) { dispatchCancelEvent(ev); mTargetTag = -1; + mGestureStartTime = TouchEvent.UNSET; } else { Log.w( "IGNORE", From beb0ee950624076f2799f62c176032f6150a59b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E9=98=B3?= Date: Tue, 2 May 2017 11:57:56 +0800 Subject: [PATCH 3/3] Upgrade react-native to 0.44.0, Upgrade peerDependencies --- README.md | 4 ++-- elements/LinearGradient.js | 1 + elements/RadialGradient.js | 1 + package.json | 6 +++--- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 75ededaa..de73d823 100644 --- a/README.md +++ b/README.md @@ -629,7 +629,7 @@ The SVG element defines a clipping path. A clipping path is used/refe width="100" > - + element is used to define a radial gradient. The - + =0.40.0", - "react": ">=15.4.0" + "react-native": ">=0.44.0", + "react": "16.0.0-alpha.6" }, "dependencies": { "color": "^0.11.1",