Merge pull request #62016 from bruvzg/fix_hp_scroll
This commit is contained in:
commit
c704b94faa
1 changed files with 1 additions and 1 deletions
|
@ -1289,7 +1289,7 @@ void CanvasItemEditor::_zoom_callback(Vector2 p_scroll_vec, Vector2 p_origin, bo
|
|||
zoom_widget->set_zoom_by_increments(-scroll_sign, p_alt);
|
||||
if (!Math::is_equal_approx(ABS(p_scroll_vec.y), (real_t)1.0)) {
|
||||
// Handle high-precision (analog) scrolling.
|
||||
zoom_widget->set_zoom(zoom * ((zoom_widget->get_zoom() / zoom - 1.f) * p_scroll_vec.y + 1.f));
|
||||
zoom_widget->set_zoom(zoom * ((zoom_widget->get_zoom() / zoom - 1.f) * ABS(p_scroll_vec.y) + 1.f));
|
||||
}
|
||||
_zoom_on_position(zoom_widget->get_zoom(), p_origin);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue