Panning an image around

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.



Go Back   Webforumz.com > Main Forums > Program Your Website > JavaScript Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Dec 30th, 2006, 21:41
drd drd is offline
SuperMember

SuperMember
Join Date: Dec 2005
Location: Hampshire, England, UK
Age: 28
Posts: 62
Thanks: 0
Thanked 0 Times in 0 Posts
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
Reply With Quote

  #2 (permalink)  
Old Dec 31st, 2006, 11:51
Most Reputable Member
Join Date: Apr 2006
Location: Cornwall, UK
Posts: 1,310
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Skype™ to ukgeoff
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.
Reply With Quote
  #3 (permalink)  
Old Dec 31st, 2006, 12:00
drd drd is offline
SuperMember

SuperMember
Join Date: Dec 2005
Location: Hampshire, England, UK
Age: 28
Posts: 62
Thanks: 0
Thanked 0 Times in 0 Posts
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?
Reply With Quote
  #4 (permalink)  
Old Dec 31st, 2006, 15:48
Most Reputable Member
Join Date: Apr 2006
Location: Cornwall, UK
Posts: 1,310
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Skype™ to ukgeoff
Re: Panning an image around

Quote:
Originally Posted by drd View Post
What layout problems do you see on my site? I don't have any issues in Opera or Firefox?
Layout problems with all three pages under the 02work section.

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.
Reply With Quote
  #5 (permalink)  
Old Dec 31st, 2006, 18:16
drd drd is offline
SuperMember

SuperMember
Join Date: Dec 2005
Location: Hampshire, England, UK
Age: 28
Posts: 62
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Panning an image around

Quote:
Originally Posted by ukgeoff View Post
Layout problems with all three pages under the 02work section.

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.

I havent seen any problems, can you post a print screen?

ta
Reply With Quote
  #6 (permalink)  
Old Dec 31st, 2006, 21:08
Most Reputable Member
Join Date: Apr 2006
Location: Cornwall, UK
Posts: 1,310
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Skype™ to ukgeoff
Re: Panning an image around

Here is the 02work-web page:
http://www.1ontheweb.net/picture_lib...k-web-page.png
Reply With Quote
  #7 (permalink)  
Old Jan 1st, 2007, 18:42
drd drd is offline
SuperMember

SuperMember
Join Date: Dec 2005
Location: Hampshire, England, UK
Age: 28
Posts: 62
Thanks: 0
Thanked 0 Times in 0 Posts
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?
Reply With Quote
  #8 (permalink)  
Old Jan 1st, 2007, 22:45
Most Reputable Member
Join Date: Apr 2006
Location: Cornwall, UK
Posts: 1,310
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Skype™ to ukgeoff
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.
Reply With Quote
Reply

Tags
image, pan

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

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


All times are GMT. The time now is 22:18.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43