You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -655,7 +655,7 @@ FlexLayout automatically includes the UIView when:
655
655
**Method:**
656
656
657
657
***`markDirty()`**
658
-
Yogais so highly optimized, that flex item are layouted only when a flex property is changed and when flex container size change. In the event that you want to force FlexLayout to do a layout of a flex item, you can mark it as dirty using `markDirty()`.
658
+
The frameworkis so highly optimized, that flex item are layouted only when a flex property is changed and when flex container size change. In the event that you want to force FlexLayout to do a layout of a flex item, you can mark it as dirty using `markDirty()`.
659
659
660
660
Dirty flag propagates to the root of the flexbox tree ensuring that when any item is invalidated its whole subtree will be re-calculated.
/// Item natural size, considering only properties of the view itself. Independent of the item frame.
132
173
publicvarintrinsicSize:CGSize{
133
174
return view.yoga.intrinsicSize
134
175
}
135
176
177
+
/// Returns the item size when layouted in the specified frame size
178
+
///
179
+
/// - Parameter size: frame size
180
+
/// - Returns: item size
136
181
publicfunc sizeThatFits(size:CGSize)->CGSize{
137
182
return view.yoga.calculateLayout(with: size)
138
183
}
139
184
140
185
//
141
186
// direction, wrap, flow
142
187
//
188
+
189
+
/// The `direction` property establishes the main-axis, thus defining the direction flex items are placed in the flex container.
143
190
///
191
+
/// The `direction` property specifies how flex items are laid out in the flex container, by setting the direction of the flex
192
+
/// container’s main axis. They can be laid out in two main directions, like columns vertically or like rows horizontally.
193
+
///
194
+
/// Note that row and row-reverse are affected by the layout direction (see `layoutDirection` property) of the flex container.
195
+
/// If its text direction is LTR (left to right), row represents the horizontal axis oriented from left to right, and row-reverse
196
+
/// from right to left; if the direction is rtl, it's the opposite.
144
197
///
145
198
/// - Parameter value: Default value is .column
146
199
@discardableResult
@@ -149,7 +202,7 @@ public class Flex {
149
202
returnself
150
203
}
151
204
152
-
///
205
+
/// The `wrap` property controls whether the flex container is single-lined or multi-lined, and the direction of the cross-axis, which determines the direction in which the new lines are stacked in.
153
206
///
154
207
/// - Parameter value: Default value is .noWrap
155
208
@discardableResult
@@ -158,6 +211,13 @@ public class Flex {
158
211
returnself
159
212
}
160
213
214
+
215
+
/// Direction defaults to Inherit on all nodes except the root which defaults to LTR. It is up to you to detect the
216
+
/// user’s preferred direction (most platforms have a standard way of doing this) and setting this direction on the
0 commit comments