[the-board] [ui] Define dragging threshold as a constant in Page



commit 0fc4eb7517af183f42fa900a8ae6daf5dd450eae
Author: Lucas Rocha <lucasr gnome org>
Date:   Wed Jan 26 22:02:34 2011 +0000

    [ui] Define dragging threshold as a constant in Page

 src/js/ui/page.js |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/js/ui/page.js b/src/js/ui/page.js
index c9196bb..0626ab7 100644
--- a/src/js/ui/page.js
+++ b/src/js/ui/page.js
@@ -17,6 +17,8 @@ const MathUtil = imports.util.mathUtil;
 // model imports
 const PageModel = imports.model.pageModel;
 
+const _DRAGGING_THRESHOLD = 2;
+
 const _LAYER_BACKGROUND   = 0.1;
 const _LAYER_THING        = 0.2;
 const _LAYER_DIMMING      = 0.3;
@@ -113,7 +115,8 @@ Page.prototype = {
 
         let dragAction = new Clutter.DragAction();
 
-        dragAction.set_drag_threshold(2, 2);
+        dragAction.set_drag_threshold(_DRAGGING_THRESHOLD,
+                                      _DRAGGING_THRESHOLD);
 
         dragAction.connect("drag-motion",
                            Lang.bind(this, this._onMainBoxDragMotion));



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