Skip to content

Commit

Permalink
Sortable: update placeholder when axis is x or y. Fixed #8274 - place…
Browse files Browse the repository at this point in the history
…holder doesn't move when dragging outside of container element

(cherry picked from commit b8b0c52)
  • Loading branch information
Jason Moon authored and scottgonzalez committed Apr 30, 2012
1 parent f0c3cf6 commit 81835fa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ui/jquery.ui.sortable.js
Expand Up @@ -468,8 +468,8 @@ $.widget("ui.sortable", $.ui.mouse, {

_intersectsWithPointer: function(item) {

var isOverElementHeight = $.ui.isOverAxis(this.positionAbs.top + this.offset.click.top, item.top, item.height),
isOverElementWidth = $.ui.isOverAxis(this.positionAbs.left + this.offset.click.left, item.left, item.width),
var isOverElementHeight = (this.options.axis === 'x') || $.ui.isOverAxis(this.positionAbs.top + this.offset.click.top, item.top, item.height),
isOverElementWidth = (this.options.axis === 'y') || $.ui.isOverAxis(this.positionAbs.left + this.offset.click.left, item.left, item.width),
isOverElement = isOverElementHeight && isOverElementWidth,
verticalDirection = this._getDragVerticalDirection(),
horizontalDirection = this._getDragHorizontalDirection();
Expand Down

0 comments on commit 81835fa

Please sign in to comment.