mirror of
https://github.com/zoriya/react-native-svg.git
synced 2025-12-20 05:55:10 +00:00
refactor text render
Support G inherit props. Refactor text render. Text glyphs will perfectly draw along the path
This commit is contained in:
@@ -17,16 +17,11 @@ const joins = {
|
||||
|
||||
export default function(props) {
|
||||
let {stroke} = props;
|
||||
if (!stroke) {
|
||||
return null;
|
||||
}
|
||||
|
||||
let strokeWidth = +props.strokeWidth;
|
||||
|
||||
if (_.isNil(props.strokeWidth)) {
|
||||
strokeWidth = 1;
|
||||
} else if (!strokeWidth) {
|
||||
return;
|
||||
strokeWidth = null;
|
||||
}
|
||||
|
||||
let strokeDasharray = props.strokeDasharray;
|
||||
@@ -40,10 +35,6 @@ export default function(props) {
|
||||
strokeDasharray.push(strokeDasharray[0]);
|
||||
}
|
||||
|
||||
if (!stroke) {
|
||||
stroke = '#000';
|
||||
}
|
||||
|
||||
return {
|
||||
stroke: extractBrush(stroke),
|
||||
strokeOpacity: extractOpacity(props.strokeOpacity),
|
||||
|
||||
Reference in New Issue
Block a user