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

Method cursor_local_position

src/plot_state.rs:460–471  ·  view source on GitHub ↗
(&self, cursor: mouse::Cursor, allow_levitating: bool)

Source from the content-addressed store, hash-verified

458 // Calculate y-axis ticks
459 let min_y_plot = self.camera.position.y - self.camera.half_extents.y;
460 let max_y_plot = self.camera.position.y + self.camera.half_extents.y;
461 let min_y = self
462 .y_axis_scale
463 .plot_to_data(min_y_plot)
464 .unwrap_or(min_y_plot);
465 let max_y = self
466 .y_axis_scale
467 .plot_to_data(max_y_plot)
468 .unwrap_or(max_y_plot);
469
470 let y_tick_values = match y_tick_producer {
471 Some(producer) => producer(min_y, max_y, self.bounds.height.into()),
472 None => Vec::new(),
473 };
474

Calls 1

newFunction · 0.50

Tested by

no test coverage detected