diff options
author | Richard Worth <rdworth@gmail.com> | 2009-01-22 13:10:18 +0000 |
---|---|---|
committer | Richard Worth <rdworth@gmail.com> | 2009-01-22 13:10:18 +0000 |
commit | 1b891501f2c5e7e6f99839121e210aa38557dad6 (patch) | |
tree | b2d363803bdc8fdc2406b1425ebe9a6e8af6269a /ui/ui.draggable.js | |
parent | 6b80dc29c8a888029f71edb73aee4e166f54214b (diff) | |
download | jquery-ui-1b891501f2c5e7e6f99839121e210aa38557dad6.tar.gz jquery-ui-1b891501f2c5e7e6f99839121e210aa38557dad6.zip |
whitespace
Diffstat (limited to 'ui/ui.draggable.js')
-rw-r--r-- | ui/ui.draggable.js | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/ui/ui.draggable.js b/ui/ui.draggable.js index e9b9142b6..d64bf7e67 100644 --- a/ui/ui.draggable.js +++ b/ui/ui.draggable.js @@ -144,7 +144,7 @@ $.widget("ui.draggable", $.extend({}, $.ui.mouse, { var dropped = false; if ($.ui.ddmanager && !this.options.dropBehaviour) dropped = $.ui.ddmanager.drop(this, event); - + //if a drop comes from outside (a sortable) if(this.dropped) { dropped = this.dropped; @@ -206,7 +206,7 @@ $.widget("ui.draggable", $.extend({}, $.ui.mouse, { //Get the offsetParent and cache its position this.offsetParent = this.helper.offsetParent(); var po = this.offsetParent.offset(); - + // This is a special case where we need to modify a offset calculated on start, since the following happened: // 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent // 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that @@ -303,7 +303,7 @@ $.widget("ui.draggable", $.extend({}, $.ui.mouse, { - ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod ) }; - + }, _generatePosition: function(event) { @@ -317,7 +317,7 @@ $.widget("ui.draggable", $.extend({}, $.ui.mouse, { if(this.cssPosition == 'relative' && !(this.scrollParent[0] != document && this.scrollParent[0] != this.offsetParent[0])) { this.offset.relative = this._getRelativeOffset(); } - + var pageX = event.pageX; var pageY = event.pageY; @@ -325,7 +325,7 @@ $.widget("ui.draggable", $.extend({}, $.ui.mouse, { * - Position constraining - * Constrain the position to a mix of grid, containment. */ - + if(this.originalPosition) { //If we are not dragging yet, we won't check for options if(this.containment) { @@ -334,7 +334,7 @@ $.widget("ui.draggable", $.extend({}, $.ui.mouse, { if(event.pageX - this.offset.click.left > this.containment[2]) pageX = this.containment[2] + this.offset.click.left; if(event.pageY - this.offset.click.top > this.containment[3]) pageY = this.containment[3] + this.offset.click.top; } - + if(o.grid) { var top = this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1]; pageY = this.containment ? (!(top - this.offset.click.top < this.containment[1] || top - this.offset.click.top > this.containment[3]) ? top : (!(top - this.offset.click.top < this.containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top; @@ -457,18 +457,18 @@ $.ui.plugin.add("draggable", "connectToSortable", { $.each(inst.sortables, function() { if(this.instance.isOver) { - + this.instance.isOver = 0; - + inst.cancelHelperRemoval = true; //Don't remove the helper in the draggable instance this.instance.cancelHelperRemoval = false; //Remove it in the sortable instance (so sortable plugins like revert still work) - + //The sortable revert is supported, and we have to set a temporary dropped variable on the draggable to support revert: 'valid/invalid' if(this.shouldRevert) this.instance.options.revert = true; - + //Trigger the stop of the sortable this.instance._mouseStop(event); - + this.instance.options.helper = this.instance.options._helper; //If the helper has been the original item, restore properties in the sortable |