![]() | |
#1
| |||
| |||
|
|
From a web page, I'd like to show a jpg/gif image that is larger than its frame, and allow a user to pan around by mouse. It shouldn't allow |
#2
| |||
| |||
|
|
From a web page, I'd like to show a jpg/gif image that is larger than its frame, and allow a user to pan around by mouse. It shouldn't allow the user to move the frame view out of the image boundaries. I've Googled for a while on this one, but nothing comes up that's simple and polished. |
#3
| |||
| |||
|
|
From a web page, I'd like to show a jpg/gif image that is larger than its frame, and allow a user to pan around by mouse. It shouldn't allow the user to move the frame view out of the image boundaries. I've Googled for a while on this one, but nothing comes up that's simple and polished. |
#4
| |||
| |||
|
|
On 2 Sep 2005 11:26:30 -0700, jim_adams (AT) hotmail (DOT) com wrote: From a web page, I'd like to show a jpg/gif image that is larger than its frame, and allow a user to pan around by mouse. It shouldn't allow the user to move the frame view out of the image boundaries. I've Googled for a while on this one, but nothing comes up that's simple and polished. There's code on http://jibbering.com/routeplanner/ which does this. Jim. |
#5
| |||
| |||
|
|
wrote on 02 sep 2005 in comp.lang.javascript: From a web page, I'd like to show a jpg/gif image that is larger than its frame, and allow a user to pan around by mouse. It shouldn't allow the user to move the frame view out of the image boundaries. I've Googled for a while on this one, but nothing comes up that's simple and polished. IE only, I think, try this first without framing: body onmousemove='window.scrollTo(x=event.x*4-500, y=event.y*3-200);status=x+","+y' img src='myPicture.gif' style='width:300%;' onclick='this.style.width=(this.style.width=="300% ")?"100%":"300%"' alt='Click me to enlarge and to move by moving the mouse' -- Evertjan. The Netherlands. (Replace all crosses with dots in my emailaddress) |
#6
| |||
| |||
|
|
Jim Ley wrote: On 2 Sep 2005 11:26:30 -0700, jim_adams (AT) hotmail (DOT) com wrote: From a web page, I'd like to show a jpg/gif image that is larger than its frame, and allow a user to pan around by mouse. It shouldn't allow the user to move the frame view out of the image boundaries. I've Googled for a while on this one, but nothing comes up that's simple and polished. There's code on http://jibbering.com/routeplanner/ which does this. Close, but it allows the image to be scrolled outside of its margins. |
#7
| |||||
| |||||
|
|
Evertjan. wrote: IE only, I think, try this first without framing: body onmousemove='window.scrollTo(x=event.x*4-500, y=event.y*3-200);status=x+","+y' img src='myPicture.gif' style='width:300%;' onclick='this.style.width=(this.style.width=="300% ")?"100%":"300%"' alt='Click me to enlarge and to move by moving the mouse' |
|
Since it's for a general website, I'd like it to support IE and Firefox at minimum. In your example, the zoom in/out works great, but the scroll doesn't seem to do its job, even in IE. |
|
Also, it brings up a warning about unsafe code in IE. |
|
I thought this would be an easy one but somehow it isn't. Just to recap, I'd like to show images at their native resolution (screen captures), but allow the user to move them around with a mouse in a view port (maybe an iFrame), |
|
similar to the way Google Earth does it (click and drag around). For asthetic reasons, I don't want the image boundaries to be movable across the viewport, just stop at the images edges accordingly. |
#8
| |||
| |||
|
![]() |
| Thread Tools | |
| Display Modes | |
| |