Merge pull request #323 from react-native-community/5.1.8

5.1.8
This commit is contained in:
Horcrux
2017-05-02 12:01:07 +08:00
committed by GitHub
6 changed files with 13 additions and 6 deletions
+2 -2
View File
@@ -629,7 +629,7 @@ The <ClipPath> SVG element defines a clipping path. A clipping path is used/refe
width="100"
>
<Defs>
<RadialGradient id="grad" cx="50%" cy="50%" rx="50%" ry="50%" fx="50%" fy="50%">
<RadialGradient id="grad" cx="50%" cy="50%" rx="50%" ry="50%" fx="50%" fy="50%" gradientUnits="userSpaceOnUse">
<Stop
offset="0%"
stopColor="#ff0"
@@ -726,7 +726,7 @@ The <RadialGradient> element is used to define a radial gradient. The <RadialGra
width="300"
>
<Defs>
<RadialGradient id="grad" cx="150" cy="75" rx="85" ry="55" fx="150" fy="75">
<RadialGradient id="grad" cx="150" cy="75" rx="85" ry="55" fx="150" fy="75" gradientUnits="userSpaceOnUse">
<Stop
offset="0"
stopColor="#ff0"
@@ -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",
+1
View File
@@ -11,6 +11,7 @@ export default class extends Component{
x2: numberProp.isRequired,
y1: numberProp.isRequired,
y2: numberProp.isRequired,
gradientUnits: PropTypes.oneOf(['objectBoundingBox', 'userSpaceOnUse']),
id: PropTypes.string.isRequired
};
+1
View File
@@ -14,6 +14,7 @@ export default class extends Component{
cx: numberProp.isRequired,
cy: numberProp.isRequired,
r: numberProp,
gradientUnits: PropTypes.oneOf(['objectBoundingBox', 'userSpaceOnUse']),
id: PropTypes.string.isRequired
};
+1 -1
View File
@@ -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(' ');
}
+3 -3
View File
@@ -1,5 +1,5 @@
{
"version": "5.1.7",
"version": "5.1.8",
"name": "react-native-svg",
"description": "SVG library for react-native",
"repository": {
@@ -22,8 +22,8 @@
"lint": "eslint ./"
},
"peerDependencies": {
"react-native": ">=0.40.0",
"react": ">=15.4.0"
"react-native": ">=0.44.0",
"react": "16.0.0-alpha.6"
},
"dependencies": {
"color": "^0.11.1",