Ryan Gahl escribió:
Well, this seems to be logic but then when you define a sortable list
all its items are not draggable objects?
There is a difference that I think you're not seeing between the DOM
element and the Draggable object.
When a Draggable is created with the "new" keyword, you pass in as the
1st argument the DOM element which will get the draggable behavior
applied to it. That does not make the DOM element the same thing as the
Draggable object that is created. They remain 2 separate entities in the
javascript environment. The Draggable object that was created in memory
knows how to manipulate the DOM element to make it draggable, but
nonetheless, the DOM element is unchanged; it's still just an element.
So to access properties on the Draggable object, you can't do it with
just a handle to the DOM element, which is what is passed into the
onDrop callback function... hence the need for the loop.
Is that a little more clear?
The information transmitted in this electronic mail is intended only for the
person or entity to which it is addressed and may contain confidential,
proprietary, and/or privileged material. Any review, retransmission,
dissemination or other use of, or taking of any action in reliance upon,
this information by persons or entities other than the intended recipient
is prohibited. If you received this in error, please contact the sender and
delete the material from all computers.
_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Sure
There are any solution in these case?
--
Mis Cosas
http://blogs.sistes.net/Garito/
_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs