diff options
author | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2013-06-05 14:44:44 +0200 |
---|---|---|
committer | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2013-06-05 14:44:44 +0200 |
commit | ffc7d310d4d36543e71a7a97604c987659e463e3 (patch) | |
tree | d171a2f7b5bc4d9ddb365c0c47254ad21f4153ce /ui | |
parent | ab48ae7e302770bb45f8aa99578303b2037e8e94 (diff) | |
parent | e776a7fb092df2eeefa975c83bd4c1c7a6439b05 (diff) | |
download | jquery-ui-ffc7d310d4d36543e71a7a97604c987659e463e3.tar.gz jquery-ui-ffc7d310d4d36543e71a7a97604c987659e463e3.zip |
Merge branch 'master' into selectmenu
Diffstat (limited to 'ui')
-rw-r--r-- | ui/jquery.ui.dialog.js | 27 | ||||
-rw-r--r-- | ui/jquery.ui.slider.js | 9 |
2 files changed, 28 insertions, 8 deletions
diff --git a/ui/jquery.ui.dialog.js b/ui/jquery.ui.dialog.js index 16095292c..b94757505 100644 --- a/ui/jquery.ui.dialog.js +++ b/ui/jquery.ui.dialog.js @@ -454,10 +454,15 @@ $.widget( "ui.dialog", { that._trigger( "drag", event, filteredUi( ui ) ); }, stop: function( event, ui ) { - options.position = [ - ui.position.left - that.document.scrollLeft(), - ui.position.top - that.document.scrollTop() - ]; + var left = ui.offset.left - that.document.scrollLeft(), + top = ui.offset.top - that.document.scrollTop(); + + options.position = { + my: "left top", + at: "left" + (left >= 0 ? "+" : "") + left + " " + + "top" + (top >= 0 ? "+" : "") + top, + of: that.window + }; $( this ).removeClass("ui-dialog-dragging"); that._unblockFrames(); that._trigger( "dragStop", event, filteredUi( ui ) ); @@ -503,8 +508,18 @@ $.widget( "ui.dialog", { that._trigger( "resize", event, filteredUi( ui ) ); }, stop: function( event, ui ) { - options.height = $( this ).height(); - options.width = $( this ).width(); + var offset = that.uiDialog.offset(), + left = offset.left - that.document.scrollLeft(), + top = offset.top - that.document.scrollTop(); + + options.height = that.uiDialog.height(); + options.width = that.uiDialog.width(); + options.position = { + my: "left top", + at: "left" + (left >= 0 ? "+" : "") + left + " " + + "top" + (top >= 0 ? "+" : "") + top, + of: that.window + }; $( this ).removeClass("ui-dialog-resizing"); that._unblockFrames(); that._trigger( "resizeStop", event, filteredUi( ui ) ); diff --git a/ui/jquery.ui.slider.js b/ui/jquery.ui.slider.js index ee7b3538f..e4f1cf7c9 100644 --- a/ui/jquery.ui.slider.js +++ b/ui/jquery.ui.slider.js @@ -131,7 +131,10 @@ $.widget( "ui.slider", $.ui.mouse, { this.range.addClass( classes + ( ( options.range === "min" || options.range === "max" ) ? " ui-slider-range-" + options.range : "" ) ); } else { - this.range = $([]); + if ( this.range ) { + this.range.remove(); + } + this.range = null; } }, @@ -145,7 +148,9 @@ $.widget( "ui.slider", $.ui.mouse, { _destroy: function() { this.handles.remove(); - this.range.remove(); + if ( this.range ) { + this.range.remove(); + } this.element .removeClass( "ui-slider" + |