Struct floating_ui_dom::OffsetOptionsValues
source · pub struct OffsetOptionsValues {
pub main_axis: Option<f64>,
pub cross_axis: Option<f64>,
pub alignment_axis: Option<f64>,
}
Expand description
Axes configuration for OffsetOptions
.
Fields§
§main_axis: Option<f64>
The axis that runs along the side of the floating element. Represents the distance (gutter or margin) between the reference and floating element.
Defaults to 0
.
cross_axis: Option<f64>
The axis that runs along the alignment of the floating element. Represents the skidding between the reference and floating element.
Defaults to 0
.
alignment_axis: Option<f64>
The same axis as cross_axis
but applies only to aligned placements and inverts the End
alignment.
When set to a number, it overrides the cross_axis
value.
A positive number will move the floating element in the direction of the opposite edge to the one that is aligned, while a negative number the reverse.
Defaults to Option::None
.
Implementations§
source§impl OffsetOptionsValues
impl OffsetOptionsValues
sourcepub fn main_axis(self, value: f64) -> OffsetOptionsValues
pub fn main_axis(self, value: f64) -> OffsetOptionsValues
Set main_axis
option.
sourcepub fn cross_axis(self, value: f64) -> OffsetOptionsValues
pub fn cross_axis(self, value: f64) -> OffsetOptionsValues
Set cross_axis
option.
sourcepub fn alignment_axis(self, value: f64) -> OffsetOptionsValues
pub fn alignment_axis(self, value: f64) -> OffsetOptionsValues
Set alignment_axis
option.
Trait Implementations§
source§impl Clone for OffsetOptionsValues
impl Clone for OffsetOptionsValues
source§fn clone(&self) -> OffsetOptionsValues
fn clone(&self) -> OffsetOptionsValues
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for OffsetOptionsValues
impl Debug for OffsetOptionsValues
source§impl Default for OffsetOptionsValues
impl Default for OffsetOptionsValues
source§fn default() -> OffsetOptionsValues
fn default() -> OffsetOptionsValues
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for OffsetOptionsValues
impl RefUnwindSafe for OffsetOptionsValues
impl Send for OffsetOptionsValues
impl Sync for OffsetOptionsValues
impl Unpin for OffsetOptionsValues
impl UnwindSafe for OffsetOptionsValues
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more