From 90fb45dffafc2e891b1ebca948ad33e6b94de112 Mon Sep 17 00:00:00 2001 From: Scott González Date: Thu, 7 Jan 2010 03:19:50 +0000 Subject: Merged in /branches/dev r3251:3620 (excluding autocomplete, modal, tooltip, menu; including menu static tests). --- ui/jquery.ui.draggable.js | 61 +++++++++++++++++++++++------------------------ 1 file changed, 30 insertions(+), 31 deletions(-) (limited to 'ui/jquery.ui.draggable.js') diff --git a/ui/jquery.ui.draggable.js b/ui/jquery.ui.draggable.js index 8aa52ac5e..fcbf328db 100644 --- a/ui/jquery.ui.draggable.js +++ b/ui/jquery.ui.draggable.js @@ -14,8 +14,33 @@ */ (function($) { -$.widget("ui.draggable", $.extend({}, $.ui.mouse, { - +$.widget("ui.draggable", $.ui.mouse, { + options: { + addClasses: true, + appendTo: "parent", + axis: false, + connectToSortable: false, + containment: false, + cursor: "auto", + cursorAt: false, + grid: false, + handle: false, + helper: "original", + iframeFix: false, + opacity: false, + refreshPositions: false, + revert: false, + revertDuration: 500, + scope: "default", + scroll: true, + scrollSensitivity: 20, + scrollSpeed: 20, + snap: false, + snapMode: "both", + snapTolerance: 20, + stack: false, + zIndex: false + }, _init: function() { if (this.options.helper == 'original' && !(/^(?:r|a|f)/).test(this.element.css("position"))) @@ -405,7 +430,7 @@ $.widget("ui.draggable", $.extend({}, $.ui.mouse, { ui = ui || this._uiHash(); $.ui.plugin.call(this, type, [event, ui]); if(type == "drag") this.positionAbs = this._convertPositionTo("absolute"); //The absolute position has to be recalculated after plugins - return $.widget.prototype._trigger.call(this, type, event, ui); + return $.Widget.prototype._trigger.call(this, type, event, ui); }, plugins: {}, @@ -419,37 +444,11 @@ $.widget("ui.draggable", $.extend({}, $.ui.mouse, { }; } -})); +}); $.extend($.ui.draggable, { version: "@VERSION", - eventPrefix: "drag", - defaults: $.extend({}, $.ui.mouse.defaults, { - addClasses: true, - appendTo: "parent", - axis: false, - connectToSortable: false, - containment: false, - cursor: "auto", - cursorAt: false, - grid: false, - handle: false, - helper: "original", - iframeFix: false, - opacity: false, - refreshPositions: false, - revert: false, - revertDuration: 500, - scope: "default", - scroll: true, - scrollSensitivity: 20, - scrollSpeed: 20, - snap: false, - snapMode: "both", - snapTolerance: 20, - stack: false, - zIndex: false - }) + eventPrefix: "drag" }); $.ui.plugin.add("draggable", "connectToSortable", { -- cgit v1.2.3