MCPcopy Create free account
hub / github.com/donkeyteethUX/iced_plot / unbind_arrow_pan

Method unbind_arrow_pan

src/controls.rs:345–358  ·  view source on GitHub ↗

Remove all arrow-key pan bindings.

(&mut self)

Source from the content-addressed store, hash-verified

343
344 /// Remove all arrow-key pan bindings.
345 pub fn unbind_arrow_pan(&mut self) -> &mut Self {
346 for key in [
347 keyboard::key::Named::ArrowLeft,
348 keyboard::key::Named::ArrowRight,
349 keyboard::key::Named::ArrowUp,
350 keyboard::key::Named::ArrowDown,
351 ] {
352 let key = keyboard::Key::Named(key);
353 if matches!(self.key_action(&key), Some(KeyAction::PanBy { .. })) {
354 self.unbind_key(&key);
355 }
356 }
357 self
358 }
359
360 /// Return whether any trigger is bound to point picking.
361 pub fn has_pick_action(&self) -> bool {

Callers 2

updateMethod · 0.80

Calls 1

unbind_keyMethod · 0.80

Tested by 1