mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-08 17:46:35 +08:00
Big refactor moving most logic into DebugComponent
Reviewed By: passy Differential Revision: D5027780 fbshipit-source-id: 95a95b3572747aa2088f8f9b35a160257eb59269
This commit is contained in:
committed by
Facebook Github Bot
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user