Skip to content

Commit

Permalink
Add polyline strokeLinecap strokeLinejoin example
Browse files Browse the repository at this point in the history
  • Loading branch information
magicismight committed Apr 23, 2016
1 parent 1741f63 commit 7d37cde
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 6 deletions.
21 changes: 20 additions & 1 deletion Example/examples/Polyline.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,25 @@ class PolylineFill extends Component{
}
}

class PolylineFillStroke extends Component{
static title = 'Stroke Polyline with strokeLinecap and strokeLinejoin';
render() {
return <Svg
height="100"
width="100"
>
<Polyline
points="10,10 30,10 30,60 60,70 95,90"
fill="none"
stroke="blue"
strokeWidth="5"
strokeLinecap="round"
strokeLinejoin="round"
/>
</Svg>;
}
}

const icon = <Svg
height="20"
width="20"
Expand All @@ -69,7 +88,7 @@ const icon = <Svg
/>
</Svg>;

const samples = [PolylineExample, StraightLines, PolylineFill];
const samples = [PolylineExample, StraightLines, PolylineFill, PolylineFillStroke];

export {
icon,
Expand Down
5 changes: 1 addition & 4 deletions lib/Transform.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,7 @@ export default class {
};

scale = (x, y) => {
if (y == null) {
y = x;
}
return this.transform(x, 0, 0, y, 0, 0);
return this.transform(x, 0, 0, y == null ? x : y, 0, 0);
};

rotate = (deg, x, y) => {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.1.1",
"version": "1.1.2",
"name": "react-native-svg",
"description": "react native svg library",
"repository": {
Expand Down

0 comments on commit 7d37cde

Please sign in to comment.