Aug 22

DHTML Panorama Test 4Javascript, ImageAugust 22nd, 2007

DHTML Panorama Test 4

Adds zooming capabilities to the existing panorama test, using the mousewheel.

Having said in the write-up for Panotest 3 that zooming won’t work properly using javascript, this test shows a way it’s actually possible to implement it. This uses the mousewheel to zoom in and out. If you have a wheel mouse, position the pointer over the panorama and scroll the wheel to zoom it.

Initially there was no obvious way to use the mousewheel in javascript, so this possibility wasn’t even attempted. However, it was noticed that Google Maps have recently implemented it for zooming on their interface. A quick Google search brought up some example code, which was inserted into the existing panorama test, and further code written to resize and move the individual images in the panorama.

This actually works quite differently in different browsers and on different operating systems, some being faster or slower than others.

http://www.bluelemur.org.uk/comics/?page=panotest4

Share This

cgitop.com

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.