> Pi a écrit :
>> (cross posted from the newly started scriptaculous group)
>
> Ah.  I'm not too sure two groups about Prototype/s.a.us is a good  
> thing:
> it will dilute the effort.

Agreed.  What new group?

>> So I know that you can apply horizontal and vertical constraints  
>> for a
>> draggable in scriptaculous. Question is, can I also put a region
>> constraint onto it? That's to say, can I make sure that the draggable
>> object stays within the rectangle described by, say, a rectangle  
>> (x,y,
>> width, height)?
>
> Write your own 'snap' callback function.  Since it can round  
> coordinates
> to make the move "stick to grid", it can also apply any constraints
> you'd like.

There's a good example of this in the repository: scriptaculous/test/ 
functional/dragdrop6_test.html


TAG




--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to