aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorMike Sherov <mike.sherov@gmail.com>2013-10-21 10:48:54 -0400
committerMike Sherov <mike.sherov@gmail.com>2013-10-21 11:20:03 -0400
commit4bd1a9c5bae513974c294d41e778fc44777c8ed2 (patch)
treec5bc5e9b827609c59a494fe11dd89bb553bff1af /ui
parent619261f0797a6fab49e2f2dd175b35795c0dc01e (diff)
downloadjquery-ui-4bd1a9c5bae513974c294d41e778fc44777c8ed2.tar.gz
jquery-ui-4bd1a9c5bae513974c294d41e778fc44777c8ed2.zip
Draggable: Make sure positional constraints are never applied to ui.originalPosition
Diffstat (limited to 'ui')
-rw-r--r--ui/jquery.ui.draggable.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/ui/jquery.ui.draggable.js b/ui/jquery.ui.draggable.js
index 651dee3d7..e528d194e 100644
--- a/ui/jquery.ui.draggable.js
+++ b/ui/jquery.ui.draggable.js
@@ -166,7 +166,7 @@ $.widget("ui.draggable", $.ui.mouse, {
});
//Generate the original position
- this.originalPosition = this.position = this._generatePosition(event);
+ this.originalPosition = this.position = this._generatePosition( event, false );
this.originalPageX = event.pageX;
this.originalPageY = event.pageY;
@@ -208,7 +208,7 @@ $.widget("ui.draggable", $.ui.mouse, {
}
//Compute the helpers position
- this.position = this._generatePosition(event);
+ this.position = this._generatePosition( event, true );
this.positionAbs = this._convertPositionTo("absolute");
//Call plugins and callbacks and use the resulting position if something is returned
@@ -488,7 +488,7 @@ $.widget("ui.draggable", $.ui.mouse, {
},
- _generatePosition: function(event) {
+ _generatePosition: function( event, constrainPosition ) {
var containment, co, top, left,
o = this.options,
@@ -513,7 +513,7 @@ $.widget("ui.draggable", $.ui.mouse, {
*/
// If we are not dragging yet, we won't check for options
- if ( this.originalPosition ) {
+ if ( constrainPosition ) {
if ( this.containment ) {
if ( this.relative_container ){
co = this.relative_container.offset();