Fixed jitter when scrolling up
This commit is contained in:
parent
8e75e7311b
commit
93f6fbd7b2
1 changed files with 1 additions and 1 deletions
|
@ -430,7 +430,7 @@ void TextEdit::_notification(int p_what) {
|
||||||
double dist = sqrt(target_y * target_y);
|
double dist = sqrt(target_y * target_y);
|
||||||
double vel = ((target_y / dist) * v_scroll_speed) * get_fixed_process_delta_time();
|
double vel = ((target_y / dist) * v_scroll_speed) * get_fixed_process_delta_time();
|
||||||
|
|
||||||
if (vel >= dist) {
|
if (Math::abs(vel) >= dist) {
|
||||||
v_scroll->set_value(target_v_scroll);
|
v_scroll->set_value(target_v_scroll);
|
||||||
scrolling = false;
|
scrolling = false;
|
||||||
set_fixed_process(false);
|
set_fixed_process(false);
|
||||||
|
|
Loading…
Reference in a new issue