mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
GestureDetector: Translate start & end gesture positions when rotated (#13101)
* GestureDetector:adjustGesCoordinate: Remove one layer of indirectiçon in direction translation That function call wrapper felt pretty unnecessary to me ;). * GestureDetector: Translate complex gesture positions, too i.e., if there's a start and end position, translate those, too. Fix #13090
This commit is contained in:
@@ -19,6 +19,8 @@ describe("gesturedetector module", function()
|
||||
DEVICE_ROTATED_COUNTER_CLOCKWISE = 3,
|
||||
}
|
||||
GestureDetector.screen.getTouchRotation = function() return rotation_mode end
|
||||
GestureDetector.screen.getHeight = function() return 800 end
|
||||
GestureDetector.screen.getWidth = function() return 600 end
|
||||
|
||||
return GestureDetector:adjustGesCoordinate(ges).direction
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user