Update drag screen koef value

This commit is contained in:
Insality
2022-07-17 18:41:02 +03:00
parent 46bcbb596d
commit 3e5a90920e
5 changed files with 12 additions and 10 deletions

View File

@@ -278,7 +278,11 @@ function Drag.on_input(self, action_id, action)
end
if self.is_drag then
self.on_drag:trigger(self:get_context(), self.dx, self.dy, self.x - self.touch_start_pos.x, self.y - self.touch_start_pos.y)
self.on_drag:trigger(self:get_context(),
self.dx * self._x_koef,
self.dy * self._y_koef,
(self.x - self.touch_start_pos.x) * self._x_koef,
(self.y - self.touch_start_pos.y) * self._y_koef)
end
return self.is_drag

View File

@@ -743,7 +743,6 @@ function Scroll._process_scroll_wheel(self, action_id, action)
return false
end
local koef = (action_id == const.ACTION_SCROLL_UP) and 1 or -1
if self.style.WHEEL_SCROLL_INVERTED then
koef = -koef