mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Sortable: update placeholder when axis is x or y. Fixed #8274 - placeholder doesn't move when dragging outside of container element
This commit is contained in:
parent
27d1023553
commit
b8b0c52830
4
ui/jquery.ui.sortable.js
vendored
4
ui/jquery.ui.sortable.js
vendored
@ -467,8 +467,8 @@ $.widget("ui.sortable", $.ui.mouse, {
|
|||||||
|
|
||||||
_intersectsWithPointer: function(item) {
|
_intersectsWithPointer: function(item) {
|
||||||
|
|
||||||
var isOverElementHeight = $.ui.isOverAxis(this.positionAbs.top + this.offset.click.top, item.top, item.height),
|
var isOverElementHeight = (this.options.axis === 'x') || $.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),
|
isOverElementWidth = (this.options.axis === 'y') || $.ui.isOverAxis(this.positionAbs.left + this.offset.click.left, item.left, item.width),
|
||||||
isOverElement = isOverElementHeight && isOverElementWidth,
|
isOverElement = isOverElementHeight && isOverElementWidth,
|
||||||
verticalDirection = this._getDragVerticalDirection(),
|
verticalDirection = this._getDragVerticalDirection(),
|
||||||
horizontalDirection = this._getDragHorizontalDirection();
|
horizontalDirection = this._getDragHorizontalDirection();
|
||||||
|
Loading…
Reference in New Issue
Block a user