mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-05-27 12:41:49 +00:00
Fix handling of react-native style transform arrays on root Svg element
Simplify urlIdPattern
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import extractColor from './extractColor';
|
||||
|
||||
const urlIdPattern = /^url\(#(.+?)\)$/;
|
||||
const urlIdPattern = /^url\(#(.+)\)$/;
|
||||
|
||||
const currentColorBrush = [2];
|
||||
|
||||
|
||||
@@ -23,14 +23,17 @@ export function transformToMatrix(props, transform) {
|
||||
|
||||
if (transform) {
|
||||
if (Array.isArray(transform)) {
|
||||
pooledMatrix.append(
|
||||
transform[0],
|
||||
transform[1],
|
||||
transform[2],
|
||||
transform[3],
|
||||
transform[4],
|
||||
transform[5],
|
||||
);
|
||||
if (typeof transform[0] === 'number') {
|
||||
pooledMatrix.append(
|
||||
transform[0],
|
||||
transform[1],
|
||||
transform[2],
|
||||
transform[3],
|
||||
transform[4],
|
||||
transform[5],
|
||||
);
|
||||
}
|
||||
// noop for react-native transform arrays, let animated handle them
|
||||
} else if (typeof transform === 'string') {
|
||||
try {
|
||||
const t = transformParser.parse(transform);
|
||||
|
||||
Reference in New Issue
Block a user