Skip to main content

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

Milestone 1.2.4 deleted

Changed May 24, 2008 07:31PM UTC by paul comment:2

component: ui.coreui.draggable
version: 1.2.31.5b4

Changed July 03, 2008 10:19PM UTC by paul comment:3

milestone: → 1.5.2
resolution: → fixed
status: newclosed

Done in r402. Use revert: "invalid"