[Libreoffice-commits] online.git: loleaflet/src

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Mar 26 16:26:13 UTC 2019


 loleaflet/src/control/Control.LokDialog.js |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit d124e3e5aaedd48c7f83f000fcbd682489b45b60
Author:     Tor Lillqvist <tml at collabora.com>
AuthorDate: Tue Mar 26 18:25:29 2019 +0200
Commit:     Tor Lillqvist <tml at collabora.com>
CommitDate: Tue Mar 26 18:25:29 2019 +0200

    Scroll in correct direction with gesture
    
    It is the combobox contents you are dragging with the gesture, so it
    should move in the same direction, not opposite.
    
    (If you would be draging the scrollbar's "thumb", then the contents of
    the combobox would indeed move in the other direction. But on a touch
    device, it definitely is the contents that the user is dragging.)
    
    Change-Id: I9dc9e3cc7e3a1412176fd1d84c5587c86410d191

diff --git a/loleaflet/src/control/Control.LokDialog.js b/loleaflet/src/control/Control.LokDialog.js
index 23186e681..814e0ab4f 100644
--- a/loleaflet/src/control/Control.LokDialog.js
+++ b/loleaflet/src/control/Control.LokDialog.js
@@ -687,14 +687,14 @@ L.Control.LokDialog = L.Control.extend({
 			}
 			else if (e.type === 'touchend')
 			{
-				this._postWindowGestureEvent(childId, 'panEnd', firstTouchPositionX, firstTouchPositionY, touchY - firstTouchPositionY);
+				this._postWindowGestureEvent(childId, 'panEnd', firstTouchPositionX, firstTouchPositionY, firstTouchPositionY - touchY);
 				firstTouchPositionX = null;
 				firstTouchPositionY = null;
 
 			}
 			else if (e.type === 'touchmove')
 			{
-				this._postWindowGestureEvent(childId, 'panUpdate', firstTouchPositionX, firstTouchPositionY, touchY - firstTouchPositionY);
+				this._postWindowGestureEvent(childId, 'panUpdate', firstTouchPositionX, firstTouchPositionY, firstTouchPositionY - touchY);
 			}
 		}, this);
 


More information about the Libreoffice-commits mailing list