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

Plot widget - allow disabling zoom and drag for x and y separately (#2901)

* Set whether zooming allowed for x and y separately

* Set whether dragging allowed for x and y separately

* Add disclaimers about interaction with data_aspect

* Show zoom & drag behavior in plot demo/charts instead of context menu demo

* Code review suggestions - use AxisBools::any()

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>

* Simplify allow_drag and allow_zoom APIs to take in Into<AxisBools>

* Remove unnecessary using...

* Remove unrelated change

---------

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
This commit is contained in:
Jackson Kruger
2023-04-18 10:58:19 -07:00
committed by GitHub
parent 902bcfe6aa
commit 438f6eafc8
3 changed files with 82 additions and 28 deletions

View File

@@ -7,7 +7,7 @@ NOTE: [`epaint`](crates/epaint/CHANGELOG.md), [`eframe`](crates/eframe/CHANGELOG
## Unreleased
* Add `char_limit` to `TextEdit` singleline mode to limit the amount of characters
* ⚠️ BREAKING: `Plot::link_axis` and `Plot::link_cursor` now take the name of the group ([#2410](https://github.com/emilk/egui/pull/2410)).
* Update `Plot::allow_zoom` and `Plot::allow_drag` to allow setting those values for X and Y axes independently ([#2901](https://github.com/emilk/egui/pull/2901)).
## 0.21.0 - 2023-02-08 - Deadlock fix and style customizability
* ⚠️ BREAKING: `egui::Context` now use closures for locking ([#2625](https://github.com/emilk/egui/pull/2625)):