Hello,

I'm making my first steps with prototype and scriptaculous.
I'm playing around with drag and drop.

What I try to do:
I have some Draggables and some Droppables. You can drag each
Draggables to each Droppables.
When I drop a Draggables I want to center the Draggables inside the
Droppable.

And here I get my first problems:-(

I use this code:
        Droppables.add( 'pos_2' , {
                onDrop: function( element, target )
                {
                        target.highlight();
                        element.absolutize();
                        new Effect.Move( element, { x: target.offsetLeft, y:
target.offsetTop, mode: 'absolute' } );
                }
        });

When I do this, it seams to work fine, but:
After the "element.absolutize();" the element is moved behind the
target. It seams that the z-index changed. I tried to change the z-
index on the element, but without luck.
The problem is, that after the drop, I can't drag the element, because
it is behind the target.

Where is my error? Perhaps someone can help me.

Thanks and greetings,
Stefan Sturm

PS: I'm using Firefox 3 RC 1 on Mac OSX 10.5.3


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to