Mikael Sand
33b4ab4f18
Update Matrix2D.js
...
fix hasInitialState for edge case
2019-06-09 12:45:10 +03:00
Mikael Sand
4de282298b
Merge pull request #1024 from react-native-community/dependabot/npm_and_yarn/js-yaml-3.13.1
...
Bump js-yaml from 3.12.1 to 3.13.1
2019-06-09 12:07:40 +03:00
dependabot[bot]
74f702ce26
Bump js-yaml from 3.12.1 to 3.13.1
...
Bumps [js-yaml](https://github.com/nodeca/js-yaml ) from 3.12.1 to 3.13.1.
- [Release notes](https://github.com/nodeca/js-yaml/releases )
- [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md )
- [Commits](https://github.com/nodeca/js-yaml/compare/3.12.1...3.13.1 )
Signed-off-by: dependabot[bot] <support@github.com >
2019-06-09 09:04:14 +00:00
Mikael Sand
06a6d0bcf6
Merge pull request #1023 from jKlag/optional_gradient_offset
...
make offset optional in gradient
2019-06-09 11:55:04 +03:00
Mikael Sand
9238d8eaef
Merge pull request #935 from SaeedZhiany/patch-1
...
Update build.gradle
2019-06-09 11:54:37 +03:00
Josh Klag
03f34e8af4
make offset optional in gradient
2019-06-07 15:21:02 -07:00
SaeedZhiany
d32b661e7b
Merge branch 'master' into patch-1
2019-05-01 17:22:42 +04:30
Mikael Sand
235ded3d09
Merge pull request #1002 from robertbarclay/bug/cocoapods_build_fix
...
Added missing header to the RNSVGImage.m file to fix a build error wh…
2019-04-26 18:21:29 +03:00
Robert Barclay
5bf58672f5
Added missing header to the RNSVGImage.m file to fix a build error when when importing as a cocoapod
2019-04-26 08:02:07 -06:00
Mikael Sand
c343229441
[iOS] fix handling kerning, wordSpacing and letterSpacing when Number
...
https://github.com/react-native-community/react-native-svg/issues/568#issuecomment-485518338
2019-04-23 00:51:52 +03:00
Mikael Sand
0835b50056
Fix translate shorthand and add array support
...
https://github.com/react-native-community/react-native-svg/issues/998
2019-04-19 04:48:45 +03:00
Mikael Sand
276a6e93af
Update README.md
2019-04-18 13:11:33 +03:00
Mikael Sand
ef0c9bbfe4
Update README.md
2019-04-18 13:05:51 +03:00
Mikael Sand
a495d11aba
Merge pull request #992 from asukiaaa/patch-1
...
Add link of w3.org to reference params for path
2019-04-15 12:22:26 +03:00
Asuki Kono
8f6fbcb74b
Add link of w3.org to reference params for path
2019-04-15 11:27:55 +09:00
Mikael Sand
2adf32645a
9.4.0
2019-04-13 22:09:57 +03:00
Mikael Sand
36674ee433
[web] Support Animated
2019-04-13 22:09:30 +03:00
Mikael Sand
fde018b8aa
[android] Clear path cache to fix fill rule when > 1 Use with same href
2019-04-01 20:02:48 +03:00
Mikael Sand
76b8b824e2
Implement support for Use element inside ClipPath
...
```jsx
import React from 'react';
import { View } from 'react-native';
import Svg, {
Defs,
ClipPath,
Path,
Rect,
G,
Text,
Polygon,
Use,
} from 'react-native-svg';
const SvgComponent = props => (
<Svg width="100%" height="30%" viewBox="0 0 140 110" {...props}>
<Defs>
<Path
id="prefix__a"
d="M25 10a20 20 0 1 0 0 40 20 20 1 1 0 0-40m20 0a20 20 0 1 0 0 40 20 20 1 1 0 0-40"
/>
<ClipPath id="prefix__b" clipRule="nonzero">
<Use xlinkHref="#prefix__a" clipRule="nonzero" />
</ClipPath>
<ClipPath id="prefix__c" clipRule="evenodd">
<Path
id="prefix__a"
y={50}
d="M25 10a20 20 0 1 0 0 40 20 20 1 1 0 0-40m20 0a20 20 0 1 0 0 40 20 20 1 1 0 0-40"
/>
</ClipPath>
<ClipPath id="prefix__d" clipRule="evenodd">
<Use xlinkHref="#prefix__a" clipRule="evenodd" y={50} />
</ClipPath>
</Defs>
<Path clipPath="url(#prefix__b)" fill="#6495ed" d="M0 5h70v50H0z" />
<Text x={15} y={54} fontSize={5} fill="#fff">
{'non-zero clip-rule'}
</Text>
<Use xlinkHref="#prefix__a" x={70} stroke="#6495ed" />
<Text x={86} y={54} fontSize={5} fill="#fff">
{'non-zero fill-rule'}
</Text>
<G>
<Path clipPath="url(#prefix__d)" fill="#daa520" d="M0 55h70v50H0z" />
<Text x={14} y={105} fontSize={5} fill="#fff">
{'even-odd clip-rule'}
</Text>
</G>
<G>
<Use
fillRule="evenodd"
xlinkHref="#prefix__a"
x={70}
y={50}
stroke="#daa520"
/>
<Text x={85} y={105} fontSize={5} fill="#fff">
{'even-odd fill-rule'}
</Text>
</G>
</Svg>
);
const SvgComponent2 = props => (
<Svg height="90" width="100" viewBox="0 0 100 90">
<Defs>
<Path d="M50,0 21,90 98,35 2,35 79,90z" id="star" fill="white" />
<ClipPath id="emptyStar" clipRule="evenodd">
<Use href="#star" clipRule="evenodd" />
</ClipPath>
<ClipPath id="filledStar" clipRule="nonzero">
<Use href="#star" clipRule="nonzero" />
</ClipPath>
</Defs>
<Rect clipPath="url(#emptyStar)" width="50" height="90" fill="blue" />
<Rect
clipPath="url(#filledStar)"
width="50"
height="90"
x="50"
fill="red"
/>
</Svg>
);
const SvgComponent3 = ({ clipRule = 'nonzero' }) => (
<Svg width="50%" height="500">
<Defs>
<ClipPath id="windowClip" clipRule={clipRule}>
<G>
<Rect x={30} y={50} height={100} width={100} />
<Text x={30} y={70} fontSize={40}>
Hello world
</Text>
<Rect x={30} y={200} height={100} width={100} />
<Rect x={100} y={250} height={100} width={100} />
<Rect x={30} y={370} height={100} width={100} />
<Polygon
transform="translate(70,400)"
points="0,0 0,100 100,120 120,0"
/>
</G>
</ClipPath>
</Defs>
<Rect height="100%" width="100%" fill="#0af" clipPath="url(#windowClip)" />
</Svg>
);
export default class App extends React.Component {
render() {
return (
<View
style={{
flex: 1,
alignContent: 'center',
justifyContent: 'center',
backgroundColor: '#ecf0f1',
}}
>
<SvgComponent />
<SvgComponent2 />
<View
style={{
flex: 1,
flexDirection: 'row',
}}
>
<SvgComponent3 />
<SvgComponent3 clipRule="evenodd" />
</View>
</View>
);
}
}
```
2019-04-01 04:36:42 +03:00
Mikael Sand
134cbad37e
[iOS] Fix clipRule="evenodd"
...
https://github.com/react-native-community/react-native-svg/issues/983
2019-04-01 04:36:42 +03:00
Mikael Sand
f63141e779
Revert "[iOS] Fix clipRule="evenodd""
...
This reverts commit 5389209
2019-04-01 04:35:30 +03:00
Mikael Sand
5389209a64
[iOS] Fix clipRule="evenodd"
...
https://github.com/react-native-community/react-native-svg/issues/983
2019-03-31 18:48:57 +03:00
Mikael Sand
3e4505caa4
9.3.7
2019-03-31 18:29:30 +03:00
Mikael Sand
9321aa504a
[android] Fix clearing of cached glyph advance on add/remove children
...
#977
2019-03-22 21:47:59 +02:00
Mikael Sand
ee6139cb03
Update README.md
2019-03-21 19:41:36 +02:00
Mikael Sand
27b49b2e4d
9.3.6
2019-03-21 19:06:39 +02:00
Mikael Sand
70ac80b297
Improved anchored text chunk logic #570
2019-03-21 18:21:40 +02:00
Mikael Sand
eaec9b9988
[android] Fix calculation / clearing of cached glyph advance
...
#977
2019-03-21 02:49:36 +02:00
Mikael Sand
1106dbae2e
9.3.5
2019-03-18 20:45:42 +02:00
Mikael Sand
0e48d439f1
[android] Fix SVG.toDataURL exception #948
2019-03-18 20:45:26 +02:00
Mikael Sand
0bea45b5e7
9.3.4
2019-03-18 20:10:58 +02:00
Mikael Sand
ccb06e8929
Fix Dynamic paths within <G> don't update #973
2019-03-18 20:09:58 +02:00
Mikael Sand
3cff87fd4f
Fix compatibility with svgr and images
...
#971
2019-03-17 03:27:53 +02:00
Mikael Sand
ec9637bcc5
Fix uncaught exception 'NSUnknownKeyException'
...
#959
2019-03-16 03:07:26 +02:00
Mikael Sand
cdf862ba73
9.3.3
2019-03-11 16:59:08 +02:00
Mikael Sand
41c66ab4b3
Merge branch 'master' of https://github.com/react-native-community/react-native-svg
2019-03-11 16:58:47 +02:00
Mikael Sand
3321ba1974
9.3.2
2019-03-11 16:56:55 +02:00
Mikael Sand
4f37411f8d
Merge pull request #965 from GertjanReynaert/patch-1
...
Fix typescript error in index.d.ts
2019-03-11 16:56:08 +02:00
Gertjan Reynaert
5505d3f11f
Fix typescript error in index.d.ts
...
When upgrading to react-native-svg 9.3.1 I got these error messages in Typescript
```
node_modules/react-native-svg/index.d.ts:105:19 - error TS1005: ';' expected.
105 VectorEffectProps {
~
node_modules/react-native-svg/index.d.ts:106:16 - error TS1109: Expression expected.
106 vectorEffect?: "none" | "non-scaling-stroke" | "nonScalingStroke" | "default" | "inherit" | "uri";
~
Found 2 errors.
```
It seems to me that this was caused by forgetting to add the `interface` keyword before `VectorEffectProps`.
This pr fixes that.
2019-03-11 09:25:59 +01:00
Mikael Sand
84e6f2402c
9.3.1
2019-03-11 04:37:52 +02:00
Mikael Sand
9a30e47ab9
Fix #961
...
### java compiler error
error: package com.facebook.infer.annotation does not exist
2019-03-11 04:37:52 +02:00
Mikael Sand
221e23a737
Update README.md
2019-03-11 03:36:03 +02:00
Mikael Sand
a6bd2d07c0
9.3.0
2019-03-11 03:13:07 +02:00
Mikael Sand
6bd27dfeba
[bugfix] Fix calling toDataUrl early and with options
...
Enable calling toDataUrl as soon as you get a ref to the svg root.
Fix invalidation and rendering with options for width and height.
2019-03-11 02:43:06 +02:00
Mikael Sand
74b0e3d99f
[web] refactor exports and cleanup docs
2019-03-10 03:51:59 +02:00
Mikael Sand
bd6ffcafe3
[js] optimize object allocations
2019-03-10 03:39:30 +02:00
Mikael Sand
fad190a283
Merge branch 'master' into vector-effect
2019-03-10 03:01:24 +02:00
Mikael Sand
7b83073856
[web] Refactor and cleanup
2019-03-10 02:33:53 +02:00
Mikael Sand
70c5954285
[web] Fix rotation transform handling, and simplify style resolution
2019-03-10 01:39:05 +02:00
Mikael Sand
53e91fcdfc
[web] Remove incorrect preserveAspectRatio logic
2019-03-09 06:28:25 +02:00