Best way to pan & scan images with jquery
Posted
by guy
on Stack Overflow
See other posts from Stack Overflow
or by guy
Published on 2010-04-13T21:01:32Z
Indexed on
2010/04/13
21:03 UTC
Read the original article
Hit count: 508
Hello,
I am trying to make an image pan & scan system. I have a slider that zooms the image (that can be dragged) and also a small map in the corner of the image (that can also be dragged). You can see a rough example here (sorry, I am not allowed to use the design, so it's not formatted): http://lighe.madetokill.com/test/test.html
My problem is that although it works great in firefox and opera, it stutters in chrome, safari and IE (it doesn't currently work in IE) at any zoom level except 100% (at 100% it's butter smooth).
What is the reason for webkit's poor performance? Am I implementing this wrong? I am basically changing the margin-left and margin-top properties of the image. I know this is fast enough since at 100% it's perfectly smooth. Would I be better off using canvas? I am trying to avoid flash (or any other plugins) if possible.
Also please note this is work in progress, there are other bugs except this, so do not bother with those :)
Thanks in advance!
© Stack Overflow or respective owner