mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-05-28 13:03:12 +00:00
Improve numberProp and numberArrayProp PropTypes usage.
Implement "normal" relative unit in java.
This commit is contained in:
@@ -95,7 +95,7 @@ class PropHelper {
|
||||
length = length.trim();
|
||||
int stringLength = length.length();
|
||||
int percentIndex = stringLength - 1;
|
||||
if (stringLength == 0) {
|
||||
if (stringLength == 0 || length.equals("normal")) {
|
||||
return offset;
|
||||
} else if (length.codePointAt(percentIndex) == '%') {
|
||||
return Double.valueOf(length.substring(0, percentIndex)) / 100 * relative + offset;
|
||||
|
||||
Reference in New Issue
Block a user