pub struct InteractionConfig {
pub drag_threshold_px: f64,
pub double_click_window_secs: f64,
pub auto_hover_state: bool,
pub auto_select_state: bool,
pub interactive_layers: Vec<String>,
pub tolerance_meters: f64,
}Expand description
Tuning knobs for the interaction manager.
All thresholds use sensible defaults matching typical web-map UX expectations. Override individual fields after construction if your host application needs different tolerances.
Fields§
§drag_threshold_px: f64Maximum pixel distance between pointer-down and pointer-up that still
counts as a click rather than a drag. Default: 5.0.
double_click_window_secs: f64Maximum elapsed seconds between two consecutive clicks that produces a
DoubleClick event. Default: 0.3 (300 ms).
auto_hover_state: boolWhen true, the manager automatically sets a "hover" boolean
property in feature state for the currently hovered feature and clears
it when the cursor leaves. Default: true.
auto_select_state: boolWhen true, the manager automatically sets a "selected" boolean
property in feature state for clicked features and clears the previous
selection. Default: false.
interactive_layers: Vec<String>Optional set of interactive layer ids. When non-empty, only layers whose style-layer id appears in this list participate in automatic hover/select queries. An empty list means all layers participate.
tolerance_meters: f64Hit tolerance in meters passed to pick queries. 0.0 means the
engine uses its default (8 pixels worth of meters).
Trait Implementations§
Source§impl Clone for InteractionConfig
impl Clone for InteractionConfig
Source§fn clone(&self) -> InteractionConfig
fn clone(&self) -> InteractionConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more