aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2008-06-04 19:13:18 +0000
committerScott González <scott.gonzalez@gmail.com>2008-06-04 19:13:18 +0000
commit2f80c18734253d78ad1fb4c216e395894625a998 (patch)
tree8a72ac3e0a1f0308b7f51269fa6c280336c5ad18
parentb6858b447cc1a2eec2a8d3d85278ecd9b15eb864 (diff)
downloadjquery-ui-2f80c18734253d78ad1fb4c216e395894625a998.tar.gz
jquery-ui-2f80c18734253d78ad1fb4c216e395894625a998.zip
Mouse: trigger start on mouse down if distance 0 and delay 0; changed default distance to 1.
-rw-r--r--ui/source/ui.core.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/ui/source/ui.core.js b/ui/source/ui.core.js
index 5fabd9ae8..c96426ac8 100644
--- a/ui/source/ui.core.js
+++ b/ui/source/ui.core.js
@@ -77,7 +77,7 @@ $.fn.remove = function() {
// $.widget is a factory to create jQuery plugins
// taking some boilerplate code out of the plugin code
-// created by Scott Gonz�lez and J�rn Zaefferer
+// created by Scott Gonz�lez and J�rn Zaefferer
function getter(namespace, plugin, method) {
var methods = $[namespace][plugin].getter || [];
methods = (typeof methods == "string" ? methods.split(/,?\s+/) : methods);
@@ -203,6 +203,11 @@ $.ui.mouse = {
}, this.options.delay);
}
+ if (this.mouseDistanceMet(e) && this.mouseDelayMet(e)) {
+ this._mouseStarted = (this.mouseStart(e) !== false);
+ if (!this._mouseStarted) { return false; }
+ }
+
// these delegates are required to keep context
this._mouseMoveDelegate = function(e) {
return self.mouseMove(e);
@@ -270,7 +275,7 @@ $.ui.mouse = {
$.ui.mouse.defaults = {
cancel: null,
- distance: 0,
+ distance: 1,
delay: 0
};