mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
Set limits on pinch zoom (#35692)
Signed-off-by: Shubham Gupta <shubham13297@gmail.com>
This commit is contained in:
parent
ce9c988f79
commit
6b69f381e0
1 changed files with 3 additions and 2 deletions
|
@ -1749,8 +1749,9 @@ impl IOCompositor {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let zoom_changed =
|
let zoom_changed = self.set_pinch_zoom_level(
|
||||||
self.set_pinch_zoom_level(self.pinch_zoom_level().get() * combined_magnification);
|
(self.pinch_zoom_level().get() * combined_magnification).clamp(MIN_ZOOM, MAX_ZOOM),
|
||||||
|
);
|
||||||
let scroll_result = combined_scroll_event.and_then(|combined_event| {
|
let scroll_result = combined_scroll_event.and_then(|combined_event| {
|
||||||
self.scroll_node_at_device_point(
|
self.scroll_node_at_device_point(
|
||||||
combined_event.cursor.to_f32(),
|
combined_event.cursor.to_f32(),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue