Skip to content

Commit

Permalink
Merge pull request #497 from react-native-community/6.0.0
Browse files Browse the repository at this point in the history
6.0.0
  • Loading branch information
magicismight authored Nov 8, 2017
2 parents e1a576f + e138082 commit a958668
Show file tree
Hide file tree
Showing 129 changed files with 7,062 additions and 1,762 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ Here's a simple example. To render output like this:
Use the following code:
```javascript
import 'react';
import Svg,{
Circle,
Ellipse,
Expand Down Expand Up @@ -808,7 +809,7 @@ npm i
3. Mask element.
4. Marker element.
5. Load Image from URL.
6. Transform prop support.
6. ~~Transform prop support~~.
### Known issues:
1. Unable to apply focus point of RadialGradient on Android.
Expand Down
8 changes: 5 additions & 3 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:2.1.0'
classpath 'com.android.tools.build:gradle:2.3.3'
}
}

apply plugin: 'com.android.library'

android {
compileSdkVersion 25
buildToolsVersion "25.0.1"
buildToolsVersion '25.0.3'

defaultConfig {
minSdkVersion 16
targetSdkVersion 23
targetSdkVersion 25
versionCode 1
versionName "1.0"
}
Expand All @@ -35,5 +35,7 @@ repositories {
}

dependencies {
compile "com.android.support:appcompat-v7:25.3.1"
//noinspection GradleDynamicVersion
compile 'com.facebook.react:react-native:+'
}
76 changes: 76 additions & 0 deletions android/src/main/java/com/horcrux/svg/AlignmentBaseline.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
package com.horcrux.svg;

import com.facebook.common.internal.ImmutableMap;

import java.util.HashMap;
import java.util.Map;

/*
https://drafts.csswg.org/css-inline/#propdef-alignment-baseline
2.2.1. Alignment Point: alignment-baseline longhand
Name: alignment-baseline
Value: baseline | text-bottom | alphabetic | ideographic | middle | central | mathematical | text-top | bottom | center | top
Initial: baseline
Applies to: inline-level boxes, flex items, grid items, table cells
Inherited: no
Percentages: N/A
Media: visual
Computed value: as specified
Canonical order: per grammar
Animation type: discrete
*/
enum AlignmentBaseline {
baseline("baseline"),
textBottom("text-bottom"),
alphabetic("alphabetic"),
ideographic("ideographic"),
middle("middle"),
central("central"),
mathematical("mathematical"),
textTop("text-top"),
bottom("bottom"),
center("center"),
top("top"),
/*
SVG implementations may support the following aliases in order to support legacy content:
text-before-edge = text-top
text-after-edge = text-bottom
*/
textBeforeEdge("text-before-edge"),
textAfterEdge("text-after-edge"),
// SVG 1.1
beforeEdge("before-edge"),
afterEdge("after-edge"),
hanging("hanging"),
;

private final String alignment;

AlignmentBaseline(String alignment) {
this.alignment = alignment;
}

public static AlignmentBaseline getEnum(String strVal) {
if (!alignmentToEnum.containsKey(strVal)) {
throw new IllegalArgumentException("Unknown String Value: " + strVal);
}
return alignmentToEnum.get(strVal);
}

private static final Map<String, AlignmentBaseline> alignmentToEnum;

static {
final Map<String, AlignmentBaseline> tmpMap = new HashMap<>();
for (final AlignmentBaseline en : AlignmentBaseline.values()) {
tmpMap.put(en.alignment, en);
}
alignmentToEnum = ImmutableMap.copyOf(tmpMap);
}

@Override
public String toString() {
return alignment;
}
}
141 changes: 0 additions & 141 deletions android/src/main/java/com/horcrux/svg/BezierTransformer.java

This file was deleted.

Loading

0 comments on commit a958668

Please sign in to comment.