Skip to content

Commit d483ac4

Browse files
Fix auto_bounds when only one axis has restricted navigation (#3171)
1 parent cd917e4 commit d483ac4

File tree

1 file changed

+2
-2
lines changed
  • crates/egui/src/widgets/plot

1 file changed

+2
-2
lines changed

crates/egui/src/widgets/plot/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -864,7 +864,7 @@ impl Plot {
864864
delta.y = 0.0;
865865
}
866866
transform.translate_bounds(delta);
867-
bounds_modified = true.into();
867+
bounds_modified = allow_drag;
868868
}
869869

870870
// Zooming
@@ -935,7 +935,7 @@ impl Plot {
935935
}
936936
if zoom_factor != Vec2::splat(1.0) {
937937
transform.zoom(zoom_factor, hover_pos);
938-
bounds_modified = true.into();
938+
bounds_modified = allow_zoom;
939939
}
940940
}
941941
if allow_scroll {

0 commit comments

Comments
 (0)