Skip to content

Commit

Permalink
Add supports for [email protected]
Browse files Browse the repository at this point in the history
Add supports for [email protected] and upgrade to 4.5.0
  • Loading branch information
magicismight committed Jan 5, 2017
1 parent e526816 commit 884c9a2
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 13 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,15 @@
```bash
npm install react-native-svg --save
```


# NOTICE:

- react-native-svg >= 3.2.0 only supports react-native >= 0.29.0
- react-native-svg >= 4.2.0 only supports react-native >= 0.32.0
- react-native-svg >= 4.3.0 only supports react-native >= 0.33.0
- react-native-svg >= 4.4.0 only supports react-native >= 0.38.0 and react >=15.4.0

- react-native-svg >= 4.4.0 only supports react-native >= 0.38.0 and react >= 15.4.0
- react-native-svg >= 4.5.0 only supports react-native >= 0.40.0 and react >= 15.4.0

2. Link native code

```bash
Expand Down
16 changes: 8 additions & 8 deletions android/src/main/java/com/horcrux/svg/RNSVGSvgViewManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@

import android.graphics.Bitmap;

import com.facebook.csslayout.CSSMeasureMode;
import com.facebook.csslayout.CSSNodeAPI;
import com.facebook.csslayout.MeasureOutput;
import com.facebook.yoga.YogaMeasureMode;
import com.facebook.yoga.YogaMeasureFunction;
import com.facebook.yoga.YogaNodeAPI;
import com.facebook.react.bridge.ReadableArray;
import com.facebook.react.common.MapBuilder;
import com.facebook.react.uimanager.BaseViewManager;
Expand All @@ -32,15 +32,15 @@ public class RNSVGSvgViewManager extends BaseViewManager<RNSVGSvgView, RNSVGSvgV

private static final String REACT_CLASS = "RNSVGSvgView";
private static final int COMMAND_TO_DATA_URL = 100;
private static final CSSNodeAPI.MeasureFunction MEASURE_FUNCTION = new CSSNodeAPI.MeasureFunction() {
private static final YogaMeasureFunction MEASURE_FUNCTION = new YogaMeasureFunction() {
@Override
public long measure(
CSSNodeAPI node,
YogaNodeAPI node,
float width,
CSSMeasureMode widthMode,
YogaMeasureMode widthMode,
float height,
CSSMeasureMode heightMode) {
throw new IllegalStateException("SvgView should have explicit width and height set");
YogaMeasureMode heightMode) {
throw new IllegalStateException("SurfaceView should have explicit width and height set");
}
};

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "4.4.1",
"version": "4.5.0",
"name": "react-native-svg",
"description": "SVG library for react-native",
"repository": {
Expand All @@ -22,7 +22,7 @@
"lint": "eslint ./"
},
"peerDependencies": {
"react-native": ">=0.38.0",
"react-native": ">=0.40.0",
"react": ">=15.4.0"
},
"dependencies": {
Expand Down

0 comments on commit 884c9a2

Please sign in to comment.