The sortable tree remembers the last tree-droppable your drag was
over (it actually moves the node while you''re dragging), and moves
your node there--it''s how the tree is programmed.
Rather than startEffect and endEffect, use an observer. See the
SortableObserver class in dragdrop.js for an example.
If your tree doesn''t need to be sortable, you could just make the
tree with draggables rather than sortables. Otherwise, in your
observer''s onStart store the original location, and in onEnd, if the
drop is one of your right-hand droppables, restore it.
TAG
On Aug 18, 2006, at 6:43 AM, Leon Chevalier wrote:
> Hi all,
>
> I have a sortable list (tree) that interacts with various droppables.
>
> [List 1]
> [List 2]
> [List 3]
> [List 4] [Drop here 1]
> [List 5] [Drop here 2]
>
> Now, on dragging [List 2] and dropping it on [Drop here 2] a
> certain action
> takes place. I then want [List 2] to return to its original location.
> However, it returns to the list below [List 4].
>
> So, any ideas how I can get it to return? I have been messing
> around with
> starteffect: and endeffect: but haven''t been able to produce
anything
> reliable.
>
> Thanks,
>
> Leon
>
>
>
>
>
> _______________________________________________
> Rails-spinoffs mailing list
> Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs