This is a discussion on "Panning an image around" within the JavaScript Forum section. This forum, and the thread "Panning an image around are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
Panning an image around
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
Panning an image around
Hi,
I've been working on a site which has a location map. Basically, when one zooms in I want to be able to pan around. To see what I mean here is a link, if you click zoom in (under the map) you'll see that you can't pan: http://www.hairbypietro.co.uk/findus.html It would be nice to be able to pan around and I can see its something I'll use a lot in the future. However, I've googled for this and I can't find an easy solution - bearing in mind I am quite new to Javascript. Can anyone help? Thanks in advance! Dave |
|
|
|
#2
|
|||
|
|||
|
Re: Panning an image around
All that is happening is that a larger version of the image is being loaded into the fixed dimensions of the div, hence the scroll bars appear so that you can move around the larger image.
BTW: Followed the link to your own site and I note there are a number of layout problems, particularly in Firefox and Opera. If you are up for it, you might like to post in the critique forum. Last edited by ukgeoff; Dec 31st, 2006 at 15:41. |
|
#3
|
|||
|
|||
|
Re: Panning an image around
Yes I know why Im getting scroll bars on that site, but what I mean is - I want to implement some Javascript to make it so the user can pan which will be nicer than using the scroll bars.
What layout problems do you see on my site? I don't have any issues in Opera or Firefox? |
|
#4
|
|||
|
|||
|
Re: Panning an image around
Quote:
Personally, I also don't like the way the black header bar extends the full width of the browser when the designed page width is clearly less. |
|
#5
|
|||
|
|||
|
Re: Panning an image around
Quote:
I havent seen any problems, can you post a print screen? ta |
|
#6
|
|||
|
|||
|
Re: Panning an image around
Here is the 02work-web page:
http://www.1ontheweb.net/picture_lib...k-web-page.png |
|
#7
|
|||
|
|||
|
Re: Panning an image around
OK thanks, well, I was going to change the site anyway, strange I havent seen that on other machines, nevermind.
Anyone got any ideas on the panning Javascript? |
|
#8
|
|||
|
|||
|
Re: Panning an image around
As it happens, I have been reading something just today, actually associated with Ajax, but you don't actually need that.
It uses two divs, one on top of the other, the larger one behind contains the image(s) and the smaller one on top acts as a window on the one behind. JavaScript functions are hooked onto the mouse events to control the dragging(panning) process. Needless to say there is a bit more involment than this but it gives you an idea of the way to go. |
![]() |
| Tags |
| image, pan |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Treating an image with <div> tags like a normal image | mikeym | Web Page Design | 2 | Mar 1st, 2008 15:28 |
| Ever needed a vector-image of a pixel-image? | delusion | Graphics and 3D | 2 | Nov 12th, 2007 02:46 |
| [SOLVED] multiple image rollover not restoring image | snappy | JavaScript Forum | 4 | Nov 5th, 2007 14:38 |
| Image gallery not displaying enlarged image | AdRock | PHP Forum | 15 | Sep 1st, 2006 11:31 |
| Background image overlaping footer image at bottom of div | lw_d | Web Page Design | 4 | Mar 21st, 2006 00:27 |