mirror of
https://github.com/emilk/egui.git
synced 2026-09-01 14:20:04 -04:00
Implement trackpad pinch-to-zoom for plots in egui_web (#333)
This adds a new `zoom_delta` to input. This is hooked up to ctrl-scroll on egui_web and egui_glium. Browsers convert trackpad pinch gestures to ctrl-scroll, so this means you can not pinch-to-zoom plots (on trackpad). In the future we can support multitouch pinch-to-zoom via the same `InputState::zoom_factor()` function
This commit is contained in:
@@ -90,6 +90,8 @@ impl PlotDemo {
|
||||
ui.checkbox(proportional, "proportional data axes");
|
||||
});
|
||||
});
|
||||
|
||||
ui.label("Drag to pan, ctrl + scroll to zoom. Double-click to reset view.");
|
||||
}
|
||||
|
||||
fn circle(&self) -> Curve {
|
||||
|
||||
Reference in New Issue
Block a user