1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-02 14:50:03 -04:00

Fix auto_bounds when only one axis has restricted navigation (#3171)

This commit is contained in:
Felix Wiegand
2023-08-09 11:08:04 +02:00
committed by GitHub
parent cd917e49f2
commit d483ac47ba

View File

@@ -864,7 +864,7 @@ impl Plot {
delta.y = 0.0; delta.y = 0.0;
} }
transform.translate_bounds(delta); transform.translate_bounds(delta);
bounds_modified = true.into(); bounds_modified = allow_drag;
} }
// Zooming // Zooming
@@ -935,7 +935,7 @@ impl Plot {
} }
if zoom_factor != Vec2::splat(1.0) { if zoom_factor != Vec2::splat(1.0) {
transform.zoom(zoom_factor, hover_pos); transform.zoom(zoom_factor, hover_pos);
bounds_modified = true.into(); bounds_modified = allow_zoom;
} }
} }
if allow_scroll { if allow_scroll {