Summary: For some internal Instagram diffs, and some external ones (auto-detection of dirty nodes). We need to give the dirty properties a little love. This adds a getter to find out if your node is dirty, and makes sure that the leaf node is properly setup before it is marked dirty to prevent a crash. Reviewed By: emilsjolander Differential Revision: D4549241 fbshipit-source-id: 36eda6fdb4ea7f968d126aab6da67896f4a01d40
920 B
920 B
CHANGELOG
The changelog for YogaKit
.
1.2.0 (upcoming release)
Breaking Changes
-
applyLayout()
has now been changed toapplyLayout(preservingOrigin:)
. -
Computed properties are no longer reflected in getter's of the affected properties.
// OLD
view.yoga.margin = 10
view.yoga.marginTop // 10
view.yoga.marginLeft // 10
// NEW
view.yoga.margin = 10
view.yoga.marginTop // 0
view.yoga.marginLeft // 0
Enhancements
-
Pixel Rounding now uses
roundf()
instead ofround()
. -
There is now a method that allows "bulk" updates to YGLayout.
[view configureLayoutWithBlock:^(YGLayout *layout) {
layout.isEnabled = YES;
layout.width = 50;
layout.height = 50;
}];
view.configureLayout { (layout) in
layout.isEnabled = true
layout.width = 50
layout.height = 50
}
- Added new
isDirty
property, and makemarkDirty
a little more performant.