[Seaside] Scriptacolous: How can I know the position of a
mrubi at fibertel.com.ar
Tue Feb 13 19:06:15 UTC 2007
Lukas, it's exactly what I was looking for.
Many thanks !!
----- Original Message -----
From: Lukas Renggli
To: The Squeak Enterprise Aubergines Server - general discussion.
Sent: Tuesday, February 13, 2007 3:16 PM
Subject: Re: [Seaside] Scriptacolous: How can I know the position of a
> I have a container where the user can drag & drop div elements. When the
> user drops an element,
The #onDrop: event of SUDroppable that passes you all the information you
the event object, the dragged element and the container element.
> I'd like to get the new element position (relative to
> the container), and store it in somewhere in the model.
> I tried to figure out how to get the element new position, but I couldn't.
> Any clues ?
Try something along the following untested code ...
onDrop: (html request
callback: [ :p | p inspect ]
value: (html element
... and you should get an inspector within the image giving you some
data about the dropped position.
Hope this helps,
Seaside mailing list
Seaside at lists.squeakfoundation.org
More information about the Seaside