mirror of
https://github.com/status-im/react-native.git
synced 2025-02-27 08:30:34 +00:00
Big refactor moving most logic into DebugComponent
Reviewed By: passy Differential Revision: D5027780 fbshipit-source-id: 95a95b3572747aa2088f8f9b35a160257eb59269
This commit is contained in:
parent
562f6c55fa
commit
81b9e108bb
@ -44,4 +44,20 @@ public class YogaValue {
|
||||
public int hashCode() {
|
||||
return Float.floatToIntBits(value) + unit.intValue();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
switch (unit) {
|
||||
case UNDEFINED:
|
||||
return "undefined";
|
||||
case POINT:
|
||||
return Float.toString(value);
|
||||
case PERCENT:
|
||||
return value + "%";
|
||||
case AUTO:
|
||||
return "auto";
|
||||
default:
|
||||
throw new IllegalStateException();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user