diff options
Diffstat (limited to 'resources/lib/jquery.ui/jquery.ui.draggable.js')
-rw-r--r-- | resources/lib/jquery.ui/jquery.ui.draggable.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/resources/lib/jquery.ui/jquery.ui.draggable.js b/resources/lib/jquery.ui/jquery.ui.draggable.js index 723dbd4915ce..6f14c9ab3e8b 100644 --- a/resources/lib/jquery.ui/jquery.ui.draggable.js +++ b/resources/lib/jquery.ui/jquery.ui.draggable.js @@ -216,7 +216,7 @@ $.widget("ui.draggable", $.ui.mouse, { if ( !elementInDom && this.options.helper === "original" ) return false; - if((this.options.revert == "invalid" && !dropped) || (this.options.revert == "valid" && dropped) || this.options.revert === true || ($.isFunction(this.options.revert) && this.options.revert.call(this.element, dropped))) { + if((this.options.revert == "invalid" && !dropped) || (this.options.revert == "valid" && dropped) || this.options.revert === true || (typeof this.options.revert === 'function' && this.options.revert.call(this.element, dropped))) { var that = this; $(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function() { if(that._trigger("stop", event) !== false) { @@ -273,7 +273,7 @@ $.widget("ui.draggable", $.ui.mouse, { _createHelper: function(event) { var o = this.options; - var helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event])) : (o.helper == 'clone' ? this.element.clone().removeAttr('id') : this.element); + var helper = typeof o.helper === 'function' ? $(o.helper.apply(this.element[0], [event])) : (o.helper == 'clone' ? this.element.clone().removeAttr('id') : this.element); if(!helper.parents('body').length) helper.appendTo((o.appendTo == 'parent' ? this.element[0].parentNode : o.appendTo)); @@ -289,7 +289,7 @@ $.widget("ui.draggable", $.ui.mouse, { if (typeof obj == 'string') { obj = obj.split(' '); } - if ($.isArray(obj)) { + if (Array.isArray(obj)) { obj = {left: +obj[0], top: +obj[1] || 0}; } if ('left' in obj) { |