(cross posted from the newly started scriptaculous group)

Alright, seems like a simple enough problem, and I'm not even sure if
it's my plain lack of knowledge that makes me ask it. Anyway.

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)?

My current workaround is to have an invisible div (let's call this B)
positioned exactly over the object I actually want to drag (call it A),
make B draggable, and then change the top and left parameters of the A
according to whatever rules I put it (ie - move only if B is within
(x,y, width, height) ) But that's kinda... cheating, no?.

So yeah, anyone got a better idea? Or is there already a way of giving
region constraints?

Thanks in advance.


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