1

Im using jQuery and jQuery UI to zoom an image. There is a container div with a fixed size and then an image that is much larger that this that is draggable within that container.

The slider that is below controls the zoom level of the image, this works fine. My issue is that when zooming the image back down in size, if it has been dragged close to an edge of the bounding container, it should snap to that edge and zoom from the remaining edges. I cannot get it to work though.

The image passes the edge and continues to be scaled down.

You can see the behaviour by zooming the image, moving the top close to the edge of the container and then zooming back down.

Any help would be appreciated, code here -- http://jsbin.com/egivat/5/edit

mcspeccy
  • 11
  • 2

1 Answers1

0

Any Animation could be done over a fixed point Check this link

Animate rotation on "CSS3"

The answer given by codeMonkey might be useful to u All the best !!

Community
  • 1
  • 1
swati
  • 129
  • 1
  • 18