Search and Top Navigation
#2914 closed enhancement (fixed)
Opened May 21, 2008 03:42PM UTC
Closed July 03, 2008 10:19PM UTC
Draggable: make revert a method
Reported by: | ivan | Owned by: | paul |
---|---|---|---|
Priority: | minor | Milestone: | 1.5.2 |
Component: | ui.draggable | Version: | 1.5b4 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
A pretty common need with draggables/droppables is to accept the drop, do some processing, and then, if some conditions are not met, restore the draggable to the original position.
I think it would make sense to make 'revert' callable externally (for example in the 'drop' method of the droppable).
The attached patch does that: unfortunately, at the moment it requires setting
draggableInstance.cancelHelperRemoval = true;in the draggable 'stop' or in the droppable 'drop' methods, to prevent the helper from being removed too soon (see also
here for a discussion).
Attachments (0)
Change History (3)
Changed May 24, 2008 03:39AM UTC by comment:1
milestone: | 1.2.4 |
---|
Changed May 24, 2008 07:31PM UTC by comment:2
component: | ui.core → ui.draggable |
---|---|
version: | 1.2.3 → 1.5b4 |
Changed July 03, 2008 10:19PM UTC by comment:3
milestone: | → 1.5.2 |
---|---|
resolution: | → fixed |
status: | new → closed |
Done in r402. Use revert: "invalid"
Milestone 1.2.4 deleted