Sensor widget builder (layout change detection).
Option type for sensor properties.
pub type Opt {
Delay(Int)
Anticipate(Float)
OnResize(String)
EventRate(Int)
A11y(a11y.A11y)
}
Constructors
pub fn anticipate(s: Sensor, a: Float) -> Sensor
Set the anticipation factor for resize detection.
pub fn build(s: Sensor) -> node.Node
Build the sensor into a renderable Node.
pub fn delay(s: Sensor, d: Int) -> Sensor
Set the delay in milliseconds.
pub fn event_rate(s: Sensor, rate: Int) -> Sensor
Set the event throttle rate in milliseconds.
pub fn new(id: String) -> Sensor
Create a new sensor builder.
pub fn on_resize(s: Sensor, tag: String) -> Sensor
Set the resize event tag.
pub fn with_opts(s: Sensor, opts: List(Opt)) -> Sensor
Apply a list of options to a sensor builder.