mirror of
https://github.com/zoriya/react-native-svg.git
synced 2025-12-21 06:15:15 +00:00
Implement correct transform parser (#507)
This commit is contained in:
committed by
Dustin Savery
parent
7ddbf2a73b
commit
f94e17e3be
@@ -1,6 +1,6 @@
|
||||
import extractFill from './extractFill';
|
||||
import extractStroke from './extractStroke';
|
||||
import extractTransform, {props2transform, tp} from './extractTransform';
|
||||
import extractTransform, {props2transform} from './extractTransform';
|
||||
import extractClipPath from './extractClipPath';
|
||||
import extractResponder from './extractResponder';
|
||||
import extractOpacity from './extractOpacity';
|
||||
@@ -27,21 +27,6 @@ export default function(props, ref) {
|
||||
extractedProps.matrix = extractTransform(props);
|
||||
|
||||
Object.assign(extractedProps, props2transform(props));
|
||||
let transform = props.transform;
|
||||
if (transform) {
|
||||
if (typeof transform === 'string') {
|
||||
const transformParsed = tp.parse(transform);
|
||||
if (transformParsed.matrix) {
|
||||
// TODO: Extract scaling values for coordinate system
|
||||
// Especially scaleY for calculating scaling of fontSize
|
||||
} else {
|
||||
let trans = props2transform(transformParsed);
|
||||
if (typeof trans === 'object') {
|
||||
Object.assign(extractedProps, trans);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Object.assign(extractedProps, extractResponder(props, ref));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user