mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-05-31 13:52:58 +00:00
Revert "change circle radius percentage calculation"
This reverts commit 99ab08db25.
This commit is contained in:
@@ -1,10 +1,5 @@
|
||||
let percentReg = /^(\-?\d+(?:\.\d+)?)(%?)$/;
|
||||
export default function (percent) {
|
||||
let matched = percent.match(percentReg);
|
||||
if (!matched) {
|
||||
console.warn(`\`${percent}\` is not a valid number or percentage string.`);
|
||||
return 0;
|
||||
}
|
||||
|
||||
return matched[2] ? matched[1] / 100 : +matched[1];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user