Ticket #3782 (closed enhancement: fixed)

Opened 6 years ago

Last modified 5 years ago

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:


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);

Change History

comment:1 Changed 5 years ago by joern.zaefferer

  • Priority changed from minor to major
  • Milestone changed from TBD to 1.7.2

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

comment:2 Changed 5 years ago by joern.zaefferer

  • Milestone changed from 1.7.2 to 1.8

comment:3 Changed 5 years ago by paul

  • Status changed from new to closed
  • Resolution set to fixed

Fixed in r3119 for both draggable and sortable.

Note: See TracTickets for help on using tickets.