Fix setter and getter of margin, position, border and padding
Summary: This diff fixes the setter and getter of margin, position, border and padding to the previous behaviour of yoga, before floatoptional change This diff also removes the unrequired `#define` Reviewed By: emilsjolander Differential Revision: D7274115 fbshipit-source-id: 942a91e6562ef789ae79102a828f397889468fa7
This commit is contained in:
committed by
Facebook Github Bot
parent
cfb9eeca20
commit
369c9ad12a
@@ -72,7 +72,10 @@ appendNumberIfNotAuto(string* base, const string& key, const YGValue number) {
|
||||
|
||||
static void
|
||||
appendNumberIfNotZero(string* base, const string& str, const YGValue number) {
|
||||
if (!YGFloatsEqual(number.value, 0)) {
|
||||
|
||||
if (number.unit == YGUnitAuto) {
|
||||
base->append(str + ": auto; ");
|
||||
} else if (!YGFloatsEqual(number.value, 0)) {
|
||||
appendNumberIfNotUndefined(base, str, number);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user