1
0
mirror of https://github.com/emilk/egui.git synced 2026-06-27 07:03:14 -04:00

Allow for changing of plot bounds from PlotUI (#2145)

This commit is contained in:
Andrew Langmeier
2022-10-13 02:00:11 -04:00
committed by GitHub
parent ae5294e63c
commit a1f6f68213

View File

@@ -1040,6 +1040,11 @@ impl PlotUi {
*self.last_screen_transform.bounds()
}
/// Move the plot bounds. Can be useful for implementing alternative plot navigation methods.
pub fn translate_bounds(&mut self, delta_pos: Vec2) {
self.last_screen_transform.translate_bounds(delta_pos);
}
/// Returns `true` if the plot area is currently hovered.
pub fn plot_hovered(&self) -> bool {
self.response.hovered()