[perf-web] Add a grab cursor while drag-scrolling



commit e570563a217b54cffaa4ad35739b2c52e1146b14
Author: Owen W. Taylor <otaylor fishsoup net>
Date:   Sun Sep 14 16:34:19 2014 -0400

    Add a grab cursor while drag-scrolling

 static/main.js  |    2 ++
 static/perf.css |    4 ++++
 2 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/static/main.js b/static/main.js
index f20d62f..e9cc479 100644
--- a/static/main.js
+++ b/static/main.js
@@ -655,6 +655,7 @@ function ScrollHandler(params)
     document.body.addEventListener("mouseup", function(event) {
         if (this.dragStartX != null) {
             this.updateDrag(event.clientX, event.clientY);
+            $( document.body ).removeClass('panning');
             this.dragStartX = null;
             event.preventDefault();
             event.stopPropagation();
@@ -671,6 +672,7 @@ ScrollHandler.prototype.startDrag = function(x, y) {
     }
     if (this.startFunction)
         this.startFunction();
+    $( document.body ).addClass('panning');
 }
 
 ScrollHandler.prototype.updateDrag = function(x, y) {
diff --git a/static/perf.css b/static/perf.css
index 744825d..3e7690b 100644
--- a/static/perf.css
+++ b/static/perf.css
@@ -7,6 +7,10 @@ body {
     color: black;
 }
 
+.panning {
+    cursor: grabbing;
+}
+
 html, body {
     margin: 0px;
     padding: 0px;


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