pub struct ScrollTrigger {
pub threshold: f64,
pub repeat: bool,
pub element_id: String,
}Expand description
Scroll trigger configuration
Fields§
§threshold: f64Trigger threshold (0.0 to 1.0)
repeat: boolWhether trigger should repeat
element_id: StringElement ID to observe
Implementations§
Source§impl ScrollTrigger
impl ScrollTrigger
Sourcepub fn new(element_id: String) -> ScrollTrigger
pub fn new(element_id: String) -> ScrollTrigger
Create new scroll trigger
Sourcepub fn with_threshold(self, threshold: f64) -> ScrollTrigger
pub fn with_threshold(self, threshold: f64) -> ScrollTrigger
Set threshold
Sourcepub fn with_repeat(self, repeat: bool) -> ScrollTrigger
pub fn with_repeat(self, repeat: bool) -> ScrollTrigger
Set repeat
Trait Implementations§
Source§impl Clone for ScrollTrigger
impl Clone for ScrollTrigger
Source§fn clone(&self) -> ScrollTrigger
fn clone(&self) -> ScrollTrigger
Returns a duplicate 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 ScrollTrigger
impl Debug for ScrollTrigger
Source§impl Default for ScrollTrigger
impl Default for ScrollTrigger
Source§fn default() -> ScrollTrigger
fn default() -> ScrollTrigger
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ScrollTrigger
impl RefUnwindSafe for ScrollTrigger
impl Send for ScrollTrigger
impl Sync for ScrollTrigger
impl Unpin for ScrollTrigger
impl UnwindSafe for ScrollTrigger
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 moreSource§impl<T> SerializableKey for T
impl<T> SerializableKey for T
Source§impl<T> StorageAccess<T> for T
impl<T> StorageAccess<T> for T
Source§fn as_borrowed(&self) -> &T
fn as_borrowed(&self) -> &T
Borrows the value.
Source§fn into_taken(self) -> T
fn into_taken(self) -> T
Takes the value.