gthmb / jquery-free-transform

provides simple controls that allows you to move/rotate/scale a DOM element. kinda like a simple version of the free transform tool in Flash or Photoshop.
133 stars 58 forks source link

Move limit within parent div #37

Open eduardodallmann opened 8 years ago

eduardodallmann commented 8 years ago

How to limit movement within the parent div?

iplus26 commented 7 years ago

When the div is about to move out of the parent div, reset the position of the freetrans instance using $ele.freetrans('reset', currentLocationOptions). currentLocationOptions can be access when you listening to the _draw method of freetrans.