Enum taffy::style::FlexDirection
source · pub enum FlexDirection {
Row,
Column,
RowReverse,
ColumnReverse,
}
Expand description
The direction of the flexbox layout main axis.
There are always two perpendicular layout axes: main (or primary) and cross (or secondary). Adding items will cause them to be positioned adjacent to each other along the main axis. By varying this value throughout your tree, you can create complex axis-aligned layouts.
Items are always aligned relative to the cross axis, and justified relative to the main axis.
The default behavior is FlexDirection::Row
.
Variants§
Row
Defines +x as the main axis
Items will be added from left to right in a row.
Column
Defines +y as the main axis
Items will be added from top to bottom in a column.
RowReverse
Defines -x as the main axis
Items will be added from right to left in a row.
ColumnReverse
Defines -y as the main axis
Items will be added from bottom to top in a column.
Trait Implementations§
source§impl Clone for FlexDirection
impl Clone for FlexDirection
source§fn clone(&self) -> FlexDirection
fn clone(&self) -> FlexDirection
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for FlexDirection
impl Debug for FlexDirection
source§impl Default for FlexDirection
impl Default for FlexDirection
source§impl PartialEq for FlexDirection
impl PartialEq for FlexDirection
source§fn eq(&self, other: &FlexDirection) -> bool
fn eq(&self, other: &FlexDirection) -> bool
self
and other
values to be equal, and is used
by ==
.