[gnome-shell/wip/paging-release: 13/90] PAginationScrollView: time when changin more than 1 page is the same as 1



commit 72dd7b7f4bd87d0fee4f59f0d09a52979f454d99
Author: Carlos Soriano <carlos soriano89 gmail com>
Date:   Mon Aug 12 17:47:52 2013 +0200

    PAginationScrollView: time when changin more than 1 page is the same as 1

 js/ui/appDisplay.js |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index 6c90d01..39a73dc 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -338,7 +338,10 @@ const PaginationScrollView = new Lang.Class({
             time = (diffFromPage / velocity) / 1000;
             
         } else
-            time = PAGE_SWITCH_TIME * diffFromPage / totalHeight;       
+            time = PAGE_SWITCH_TIME * diffFromPage / totalHeight;
+        // Take care when we are changing more than one page, maximum time
+        // regardless the velocity is the default one
+        time = Math.min(time, PAGE_SWITCH_TIME);
         if(pageNumber < this._pages.nPages() && pageNumber >= 0) {
             this._currentPage = pageNumber;
             let params = { value: this._pages.getPagePosition(this._currentPage)[1],


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