fix incorrect docs for JustifyItems and JustifySelf (#9539)
# Objective Fixes incorrect docs in `bevy_ui` for `JustifyItems` and `JustifySelf`. ## Solution `JustifyItems` and `JustifySelf` target the main axis and not the cross axis.
This commit is contained in:
parent
8edcd8285d
commit
f813831409
@ -651,7 +651,7 @@ impl Default for AlignItems {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// How items are aligned according to the cross axis
|
/// How items are aligned according to the main axis
|
||||||
#[derive(Copy, Clone, PartialEq, Eq, Debug, Serialize, Deserialize, Reflect)]
|
#[derive(Copy, Clone, PartialEq, Eq, Debug, Serialize, Deserialize, Reflect)]
|
||||||
#[reflect(PartialEq, Serialize, Deserialize)]
|
#[reflect(PartialEq, Serialize, Deserialize)]
|
||||||
pub enum JustifyItems {
|
pub enum JustifyItems {
|
||||||
@ -665,7 +665,7 @@ pub enum JustifyItems {
|
|||||||
Center,
|
Center,
|
||||||
/// Items are aligned at the baseline.
|
/// Items are aligned at the baseline.
|
||||||
Baseline,
|
Baseline,
|
||||||
/// Items are stretched across the whole cross axis.
|
/// Items are stretched across the whole main axis.
|
||||||
Stretch,
|
Stretch,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -714,12 +714,12 @@ impl Default for AlignSelf {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// How this item is aligned according to the cross axis.
|
/// How this item is aligned according to the main axis.
|
||||||
/// Overrides [`AlignItems`].
|
/// Overrides [`JustifyItems`].
|
||||||
#[derive(Copy, Clone, PartialEq, Eq, Debug, Serialize, Deserialize, Reflect)]
|
#[derive(Copy, Clone, PartialEq, Eq, Debug, Serialize, Deserialize, Reflect)]
|
||||||
#[reflect(PartialEq, Serialize, Deserialize)]
|
#[reflect(PartialEq, Serialize, Deserialize)]
|
||||||
pub enum JustifySelf {
|
pub enum JustifySelf {
|
||||||
/// Use the parent node's [`AlignItems`] value to determine how this item should be aligned.
|
/// Use the parent node's [`JustifyItems`] value to determine how this item should be aligned.
|
||||||
Auto,
|
Auto,
|
||||||
/// This item will be aligned with the start of the axis.
|
/// This item will be aligned with the start of the axis.
|
||||||
Start,
|
Start,
|
||||||
@ -729,7 +729,7 @@ pub enum JustifySelf {
|
|||||||
Center,
|
Center,
|
||||||
/// This item will be aligned at the baseline.
|
/// This item will be aligned at the baseline.
|
||||||
Baseline,
|
Baseline,
|
||||||
/// This item will be stretched across the whole cross axis.
|
/// This item will be stretched across the whole main axis.
|
||||||
Stretch,
|
Stretch,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user