Hi guys,

I'm having some issues with Element.makeDraggable and I'd like some help to 
fix or make it better.

I need to drag some divs witch are in a overflowed div (artworks in 
example) and drop them into some other divs (albums in example) . So I 
create clones to play with all over the window. Thing is my window allow 
the user to update some parts of its and can offer some new droppable divs 
(added droppable in example). 

1st problem :
This means that the *droppables* option in Element.makeDraggable must be 
refreshed. I did not find on the net and the http://mootools.net any 
informations about how to do this. The call of *checkDroppables *in the 
onDrag function does not deal this thing. So I looked into the source code 
and found there is no function to do that I implemented it in my code by 
overriding *this.droppables *on line 7 : *this.droppables = 
$$('.amo-widget[data-type="album"]');* Now it works but I feel like it's 
not clean, so if some of you have a cleaner solution :p

2nd problem : 
I had to override the drag function to put the clone on the position I 
wanted, but I'm not sure this is the best way as it does not do the 
Drag.drag() things  (cf onDrag in example)

I've made a little example on http://jsfiddle.net/wordsbybird/TAVfk/

Regards, Alain ANDRE.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"MooTools Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mootools-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to