diff options
author | TJ VanToll <tj.vantoll@gmail.com> | 2013-12-12 22:10:06 -0500 |
---|---|---|
committer | TJ VanToll <tj.vantoll@gmail.com> | 2014-01-15 15:38:10 -0500 |
commit | 28310ff55f062199fb2f187ea13d3561a879aea8 (patch) | |
tree | 84bfaf2266437b2357967dea5284207c71a30448 /ui/jquery.ui.draggable.js | |
parent | 1bbbcc723c489d7ef7d72bb62564b8f07805c41c (diff) | |
download | jquery-ui-28310ff55f062199fb2f187ea13d3561a879aea8.tar.gz jquery-ui-28310ff55f062199fb2f187ea13d3561a879aea8.zip |
Slider & Interactions: Add Windows 8 touch support
Fixes #9709
Fixes #9710
Closes gh-1152
Diffstat (limited to 'ui/jquery.ui.draggable.js')
-rw-r--r-- | ui/jquery.ui.draggable.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/ui/jquery.ui.draggable.js b/ui/jquery.ui.draggable.js index f18b383d3..5cbe92fce 100644 --- a/ui/jquery.ui.draggable.js +++ b/ui/jquery.ui.draggable.js @@ -60,9 +60,16 @@ $.widget("ui.draggable", $.ui.mouse, { if (this.options.disabled){ this.element.addClass("ui-draggable-disabled"); } + this._setHandleClassName(); this._mouseInit(); + }, + _setOption: function( key, value ) { + this._super( key, value ); + if ( key === "handle" ) { + this._setHandleClassName(); + } }, _destroy: function() { @@ -71,6 +78,7 @@ $.widget("ui.draggable", $.ui.mouse, { return; } this.element.removeClass( "ui-draggable ui-draggable-dragging ui-draggable-disabled" ); + this._removeHandleClassName(); this._mouseDestroy(); }, @@ -296,6 +304,17 @@ $.widget("ui.draggable", $.ui.mouse, { true; }, + _setHandleClassName: function() { + this._removeHandleClassName(); + $( this.options.handle || this.element ).addClass( "ui-draggable-handle" ); + }, + + _removeHandleClassName: function() { + this.element.find( ".ui-draggable-handle" ) + .addBack() + .removeClass( "ui-draggable-handle" ); + }, + _createHelper: function(event) { var o = this.options, |