Ticket #3782 (closed enhancement: fixed)
ui object should retrieve original position also
| Reported by: | 4pcbr | Owned by: | |
|---|---|---|---|
| Priority: | major | Milestone: | 1.8 |
| Component: | ui.draggable | Version: | 1.6rc4 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
Resizable callbacks returns ui.size and ui.originalSize, i.e. user can get both original and actual sizes while only stop callback is called.
But if I wanna know original position of draggable element after it dragged, i should to remember its original position in start callback, and then get remembered original position object in a stop callback.
I think it is inconvenient, I need to remember original object somewhere and to define start callback for this purpose only(if not defined earlier : )).
Here is my uiHash modification:
uiHash: function(e) {
return {
helper: this.helper,
position: this.position,
absolutePosition: this.positionAbs,
originalPosition: this.originalPosition,
absoluteOriginalPosition: this.originalPositionAbs,
options: this.options
}
}
originalPositionAbs is defined in mouseStart(e) method:
this.originalPosition = this.generatePosition(e);
this.originalPositionAbs = this.convertPositionTo("absolute", this.originalPosition);


Consistency is important, and the original position can't be easily retrieved otherwise.