Search and Top Navigation
#3782 closed enhancement (fixed)
Opened January 06, 2009 05:26PM UTC
Closed August 23, 2009 05:41PM UTC
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: | ||
Blocked by: | Blocking: |
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);
Attachments (0)
Change History (3)
Changed May 07, 2009 11:47AM UTC by comment:1
milestone: | TBD → 1.7.2 |
---|---|
priority: | minor → major |
Changed May 07, 2009 01:16PM UTC by comment:2
milestone: | 1.7.2 → 1.8 |
---|
Changed August 23, 2009 05:41PM UTC by comment:3
resolution: | → fixed |
---|---|
status: | new → closed |
Fixed in r3119 for both draggable and sortable.
Consistency is important, and the original position can't be easily retrieved otherwise.