View Full Version : Imagepanner initial image scale

08-03-2010, 05:01 PM
1) Script Title: Imagepanner

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex4/imagepanner.htm

3) Describe problem: The size of my image is approx. 1000 * 600, displayed in a div approx. 680 * 400. I would like the initial loaded image re-scaled to 680 * 400 so that the full sized, pannable view is only available after a zoom.

I have tried the modified script where you allow zooming out to 0.5, but unfortunately my initial image size is not 0.5 scale. Any suggestions?

Thanx in advance

08-04-2010, 05:57 AM
I have tried the modified script where you allow zooming out to 0.5

If you mean here:

magnifyicons: ['magnify.gif','magnify2.gif', 24,23], //set path to zoom in/out images, plus their dimensions
maxzoom: 4, //set maximum zoom level (from 1x)

As it says, from 1x. 0.5 is less than 1.

Anyways, I'd try leaving that part the way it was for now (as 4), and simply setting the dimensions of the image to the smaller size in this part (the on page HTML):

<div class="pancontainer" data-orient="center" data-canzoom="yes" style="width:400px; height:300px;">
<img src="http://i44.tinypic.com/1hezvm.jpg" style="width:700px; height:525px" />

If you want more help:

Please post a link to a page on your site that contains the problematic code so we can check it out.

08-04-2010, 01:17 PM
Thanks for your reply. I was referring to another modified script available on the forum which is set to allow 0.5. But your reply clarified a bit of confusion: I thought the size parameters for img src had to be the actual image size; in fact, I have now set the container size and the img src size to the same values and now the entire image shows, initially at a reduced scale, as I wanted. Thanks again.