|
1626 | 1626 | if (this.prepared && this.target) {
|
1627 | 1627 | var target = this.target,
|
1628 | 1628 | shouldSnap = checkSnap(target, this.prepared) && (!target.options.snap.endOnly || preEnd),
|
1629 |
| - shouldRestrict = checkRestrict(target, this.prepared) && (!target.options.restrict.endOnly || preEnd), |
1630 |
| - |
1631 |
| - coords = starting? this.startCoords.page : this.curCoords.page; |
| 1629 | + shouldRestrict = checkRestrict(target, this.prepared) && (!target.options.restrict.endOnly || preEnd); |
1632 | 1630 |
|
1633 | 1631 | if (starting) {
|
1634 | 1632 | var rect = target.getRect(this.element),
|
|
1666 | 1664 | }
|
1667 | 1665 | }
|
1668 | 1666 |
|
1669 |
| - if (shouldSnap ) { this.setSnapping (coords); } else { this.snapStatus .locked = false; } |
1670 |
| - if (shouldRestrict) { this.setRestriction(coords); } else { this.restrictStatus.restricted = false; } |
| 1667 | + var snapCoords = starting? this.startCoords.page : this.curCoords.page; |
| 1668 | + |
| 1669 | + if (shouldSnap ) { this.setSnapping (snapCoords); } else { this.snapStatus .locked = false; } |
| 1670 | + if (shouldRestrict) { this.setRestriction(snapCoords); } else { this.restrictStatus.restricted = false; } |
1671 | 1671 |
|
1672 | 1672 | var shouldMove = (shouldSnap? (this.snapStatus.changed || !this.snapStatus.locked): true)
|
1673 | 1673 | && (shouldRestrict? (!this.restrictStatus.restricted || (this.restrictStatus.restricted && this.restrictStatus.changed)): true);
|
|
1695 | 1695 | this.fireActiveDrops(dropEvents.activate);
|
1696 | 1696 | }
|
1697 | 1697 |
|
| 1698 | + snapCoords = this.curCoords.page; |
| 1699 | + |
1698 | 1700 | // set snapping and restriction for the move event
|
1699 |
| - if (shouldSnap ) { this.setSnapping (coords); } |
1700 |
| - if (shouldRestrict) { this.setRestriction(coords); } |
| 1701 | + if (shouldSnap ) { this.setSnapping (snapCoords); } |
| 1702 | + if (shouldRestrict) { this.setRestriction(snapCoords); } |
1701 | 1703 | }
|
1702 | 1704 |
|
1703 | 1705 | this.prevEvent = this[action + 'Move'](event);
|
|
0 commit comments