});
//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;
}
//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
},
- _generatePosition: function(event) {
+ _generatePosition: function( event, constrainPosition ) {
var containment, co, top, left,
o = this.options,
*/
// 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();