[Seaside] Seaside + Scriptaculous draggable onEnd: question
dima-sender-3c337a at yasp.com
Fri Jul 25 15:24:14 UTC 2008
I am new to this and it is not quite easy to find any good docs online except a Squeak image in my hands.
The idea is to allow user to select a fixed size square area in the picture all controlled by my seaside app.
to do so I gonna use Scriptaculous, something like:
html image url: 'test.png';
html div id: 'square-selector';
style: 'border: solid 1px red; width: 432px; height: 432px; position relative; background: transparent';
html draggable revert: false;
The question is what to put into onEnd: () ???
I want to check drop location of my square-selector inside the picture, adjust it if user went outside the picture
and finally have x and y of top left corner of my square-selector relative to picture stored in ivars (which is trivial).
http://scriptaculous.seasidehosting.st/ examples seems to show that it is possible, but not very clear how to do it.
More information about the seaside