From 94e1d6443d62da58ab1c65aecc262ee73a5c1faa Mon Sep 17 00:00:00 2001 From: magicismight Date: Fri, 21 Jul 2017 14:38:03 +0800 Subject: [PATCH 1/2] Update README --- README.md | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index bd9d417a..9c4eb537 100644 --- a/README.md +++ b/README.md @@ -75,7 +75,7 @@ Here's a simple example. To render output like this: -![SVG example](./screenShoots/svg.png) +![SVG example](https://raw.githubusercontent.com/react-native-community/react-native-svg/master/screenShoots/svg.png) Use the following code: @@ -191,7 +191,7 @@ The element is used to create a rectangle and variations of a rectangle s ``` -![Rect](./screenShoots/rect.png) +![Rect](https://raw.githubusercontent.com/react-native-community/react-native-svg/master/screenShoots/rect.png) Code explanation: @@ -217,7 +217,7 @@ The element is used to create a circle: ``` -![Rect](./screenShoots/circle.png) +![Rect](https://raw.githubusercontent.com/react-native-community/react-native-svg/master/screenShoots/circle.png) Code explanation: @@ -246,7 +246,7 @@ An ellipse is closely related to a circle. The difference is that an ellipse has /> ``` -![Rect](./screenShoots/ellipse.png) +![Rect](https://raw.githubusercontent.com/react-native-community/react-native-svg/master/screenShoots/ellipse.png) Code explanation: @@ -275,7 +275,7 @@ The element is an SVG basic shape, used to create a line connecting two p ``` -![Rect](./screenShoots/line.png) +![Rect](https://raw.githubusercontent.com/react-native-community/react-native-svg/master/screenShoots/line.png) Code explanation: @@ -302,7 +302,7 @@ The element is used to create a graphic that contains at least three s ``` -![Rect](./screenShoots/polygon.png) +![Rect](https://raw.githubusercontent.com/react-native-community/react-native-svg/master/screenShoots/polygon.png) Code explanation: @@ -326,7 +326,7 @@ The element is used to create any shape that consists of only straigh ``` -![Rect](./screenShoots/polyline.png) +![Rect](https://raw.githubusercontent.com/react-native-community/react-native-svg/master/screenShoots/polyline.png) Code explanation: @@ -364,7 +364,7 @@ The following commands are available for path data: ``` -![Rect](./screenShoots/path.png) +![Rect](https://raw.githubusercontent.com/react-native-community/react-native-svg/master/screenShoots/path.png) #### Text @@ -388,7 +388,7 @@ The element is used to define text. ``` -![Text](./screenShoots/text.png) +![Text](https://raw.githubusercontent.com/react-native-community/react-native-svg/master/screenShoots/text.png) #### TSpan @@ -416,7 +416,7 @@ The element is used to draw multiple lines of text in SVG. Rather than h ``` -![TSpan](./screenShoots/tspan.png) +![TSpan](https://raw.githubusercontent.com/react-native-community/react-native-svg/master/screenShoots/tspan.png) #### TextPath @@ -453,7 +453,7 @@ In addition to text drawn in a straight line, SVG also includes the ability to p ``` -![TextPath](./screenShoots/text-path.png) +![TextPath](https://raw.githubusercontent.com/react-native-community/react-native-svg/master/screenShoots/text-path.png) #### G @@ -496,7 +496,7 @@ The element is a container used to group other SVG elements. Transformations ``` -![G](./screenShoots/g.png) +![G](https://raw.githubusercontent.com/react-native-community/react-native-svg/master/screenShoots/g.png) #### Use @@ -527,7 +527,7 @@ Before the element can be referenced, it must have an ID set on it via its i The element specifies where to show the reused shapes via its x and y props. Notice that the shapes inside the element are located at 0,0. That is done because their position is added to the position specified in the element. -![use](./screenShoots/use.png) +![use](https://raw.githubusercontent.com/react-native-community/react-native-svg/master/screenShoots/use.png) #### Symbol @@ -566,7 +566,7 @@ The SVG element is used to define reusable symbols. The shapes nested i ``` -![Symbol](./screenShoots/symbol.png) +![Symbol](https://raw.githubusercontent.com/react-native-community/react-native-svg/master/screenShoots/symbol.png) #### Defs @@ -621,7 +621,7 @@ The element allows a raster image to be included in an Svg componenet. ``` -![Image](./screenShoots/image.png) +![Image](https://raw.githubusercontent.com/react-native-community/react-native-svg/master/screenShoots/image.png) #### ClipPath @@ -673,7 +673,7 @@ The SVG element defines a clipping path. A clipping path is used/refe ``` -![ClipPath](./screenShoots/clip-path.png) +![ClipPath](https://raw.githubusercontent.com/react-native-community/react-native-svg/master/screenShoots/clip-path.png) #### LinearGradient @@ -708,7 +708,7 @@ Code explanation: * The color range for a gradient can be composed of two or more colors. Each color is specified with a tag. The offset prop is used to define where the gradient color begin and end * The fill prop links the ellipse element to the gradient -![LinearGradient](./screenShoots/lineargradient.png) +![LinearGradient](https://raw.githubusercontent.com/react-native-community/react-native-svg/master/screenShoots/lineargradient.png) *NOTICE:* LinearGradient also supports percentage as prop: @@ -754,7 +754,7 @@ Code explanation: * The color range for a gradient can be composed of two or more colors. Each color is specified with a tag. The offset prop is used to define where the gradient color begin and end * The fill prop links the ellipse element to the gradient -![RadialGradient](./screenShoots/radialgradient.png) +![RadialGradient](https://raw.githubusercontent.com/react-native-community/react-native-svg/master/screenShoots/radialgradient.png) #### Touch Events @@ -781,7 +781,7 @@ You can use these events to provide interactivity to your react-native-svg compo /> ``` -![TouchEvents](./screenShoots/touchevents.gif) +![TouchEvents](https://raw.githubusercontent.com/react-native-community/react-native-svg/master/screenShoots/touchevents.gif) For more examples of touch in action, checkout the [TouchEvents.js examples](https://github.com/magicismight/react-native-svg-example/blob/master/examples/TouchEvents.js). From 90fb82caf03b0af6fc1122cb1f597ae09f8f5fdb Mon Sep 17 00:00:00 2001 From: magicismight Date: Tue, 25 Jul 2017 19:46:26 +0800 Subject: [PATCH 2/2] Revert "fixed issue #397" This reverts commit 26bbc1c3180a9486ad16cc5a5be96e02eb705479. --- android/src/main/java/com/horcrux/svg/SvgPackage.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/android/src/main/java/com/horcrux/svg/SvgPackage.java b/android/src/main/java/com/horcrux/svg/SvgPackage.java index 278ab13a..716a8da3 100644 --- a/android/src/main/java/com/horcrux/svg/SvgPackage.java +++ b/android/src/main/java/com/horcrux/svg/SvgPackage.java @@ -44,6 +44,11 @@ public class SvgPackage implements ReactPackage { new SvgViewManager()); } + @Override + public List> createJSModules() { + return Collections.emptyList(); + } + @Override public List createNativeModules(ReactApplicationContext reactContext) { return Collections.singletonList(new SvgViewModule(reactContext));