[gnome-shell/wip/exalm/gestures] update docs



commit 3b8d899f3649a263ad402cb652399cc9676d9e0e
Author: Alexander Mikhaylenko <exalm7659 gmail com>
Date:   Sat Jun 29 16:26:53 2019 +0500

    update docs

 js/ui/swipeTracker.js | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)
---
diff --git a/js/ui/swipeTracker.js b/js/ui/swipeTracker.js
index 6e9ff7137..8a126460a 100644
--- a/js/ui/swipeTracker.js
+++ b/js/ui/swipeTracker.js
@@ -26,6 +26,7 @@ function clamp(value, min, max) {
 }
 
 // TODO: support horizontal
+// TODO: swap back and forward, this doesn't make sense
 
 var TouchpadSwipeGesture = class TouchpadSwipeGesture {
     constructor(shouldSkip) {
@@ -157,12 +158,14 @@ Signals.addSignalMethods(ScrollGesture.prototype);
 //   The parameters are:
 //    * canSwipeBack: whether the tracker should allow to swipe back;
 //    * canSwipeForward: whether the tracker should allow to swipe forward;
-//    * distance: the page size
-//    * backExtent: can be used to make "back" page longer. Normally this is 0.
-//    * forwardExtent: can be used to make "forward" page longer. Normally this is 0
+//    * distance: the page size;
+//    * backExtent: can be used to make "back" page longer. Normally this is 0;
+//    * forwardExtent: can be used to make "forward" page longer. Normally this is 0.
 //   Extents should be used for extending one or both page in some cases (such as switching to a
 //   workspace with a fullscreen window). Speed of touchpad swipe and scrolling only depend on
 //   distance, so the speed is consistent with or without extents.
+//   Internally it means progress range is not [-1, 1], but [-(1 + forwardExtent/distance), 1 + 
(backExtent/distance)],
+//   but progress and duration in update() and end() will be normalized.
 //
 // update(tracker, progress)
 //   The handler should set the progress to the given value.
@@ -270,10 +273,6 @@ var SwipeTracker = class {
         this._state = State.SCROLLING;
     }
 
-//    _updateGestureWithClamp(gesture, time, delta) {
-//        this._updateGesture(gesture, time, delta / this._distance);
-//    }
-
     _updateGesture(gesture, time, delta) {
         if ((this._allowedModes & Main.actionMode) == 0 || !this._enabled)
             return;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]