pub struct KineticScrollOptions {
pub enabled: bool,
pub mouse: bool,
pub min_scroll_speed: f32,
pub max_scroll_speed: f32,
pub damping_coeff: f32,
pub scroll_min_move: f32,
}Expand description
Kinetic scroll animation parameters.
Fields§
§enabled: boolContinue scrolling after a horizontal touch drag is released Default: false (chart stops immediately on release)
mouse: boolContinue scrolling after a mouse drag is released, independently of enabled
Default: false
min_scroll_speed: f32Min scroll speed (pixels/frame) Default: 0.2
max_scroll_speed: f32Max scroll speed (pixels/frame) Default: 7.0
damping_coeff: f32Damping coefficient: the share of scroll velocity kept per frame.
Accepts finite values in 0.0..1.0 (zero stops immediately, one is excluded).
Invalid values are replaced by the default when chart options are applied.
Default: 0.997 (~99.7% of speed retained each frame)
scroll_min_move: f32Min pixels moved to trigger kinetic scroll Default: 15.0
Trait Implementations§
Source§impl Clone for KineticScrollOptions
impl Clone for KineticScrollOptions
Source§fn clone(&self) -> KineticScrollOptions
fn clone(&self) -> KineticScrollOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for KineticScrollOptions
Source§impl Debug for KineticScrollOptions
impl Debug for KineticScrollOptions
Source§impl Default for KineticScrollOptions
impl Default for KineticScrollOptions
Source§impl<'de> Deserialize<'de> for KineticScrollOptions
impl<'de> Deserialize<'de> for KineticScrollOptions
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for KineticScrollOptions
impl PartialEq for KineticScrollOptions
Source§impl Serialize for KineticScrollOptions
impl Serialize for KineticScrollOptions
impl StructuralPartialEq for KineticScrollOptions
Auto Trait Implementations§
impl Freeze for KineticScrollOptions
impl RefUnwindSafe for KineticScrollOptions
impl Send for KineticScrollOptions
impl Sync for KineticScrollOptions
impl Unpin for KineticScrollOptions
impl UnsafeUnpin for KineticScrollOptions
impl UnwindSafe for KineticScrollOptions
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more