Skip to content
Permalink
Browse files

Mouse: trigger start on mouse down if distance 0 and delay 0; changed…

… default distance to 1.
  • Loading branch information
scottgonzalez committed Jun 4, 2008
1 parent b6858b4 commit 2f80c18734253d78ad1fb4c216e395894625a998
Showing with 7 additions and 2 deletions.
  1. +7 −2 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
};

0 comments on commit 2f80c18

Please sign in to comment.
You can’t perform that action at this time.