Broetchen1234 / iui

Automatically exported from code.google.com/p/iui
MIT License
0 stars 0 forks source link

iUI and FancyZoom #199

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hello there,

I would like to use the FancyZoom javascript (to zoom in images with a Mac
OS X style) with my iUI webapp, it would totally fit with the iPhone.
But the issue is that it doesn't work, and I have no clue why.

The script is available here: http://www.cabel.name/2008/02/fancyzoom-10.html

I followed all the steps to install it but it doesn't worked, I guess this
is because of iUI, someone can tell me how I can make it work?

Here is what firebug can tell me in the console (the red thing appear when
I click on the image to zoom in):
http://img687.imageshack.us/img687/2897/bugiuifancyzoom.png
I've double checked the image exist, and works well when I go to the link
without javascript.

Would be great if someone have an idea, thanks!

Charles

Original issue reported on code.google.com by charles....@gmail.com on 7 Dec 2009 at 5:55

GoogleCodeExporter commented 9 years ago
Charles, I recommend you post this issue to the iPhoneWebDev Google Group and 
ask for help there.  Including 
a link to your page would help, too.

Original comment by msgilli...@gmail.com on 7 Dec 2009 at 6:41

GoogleCodeExporter commented 9 years ago
For those who want to make it work, I've found a way 
(http://groups.google.com/group/iphonewebdev/browse_thread/thread/bd5a19210766dd
a5).

Here is what I had to do: 

1/ First, as you said, we have to load setupZoom() every time a new 
page loads (Ajax), so I added a call to setupZoom() in the slideDone() 
function (iui.js). 

Then it didn't worked yet, because the setupZoom() will append the 
zoombox just after the body tag, which was an issue because it was 
hidden by the toolbar or something else. 

2/ So I had to change a little thing in the insertZoomHTML() function, 
which is located in FancyZoomHTML.js : 
Line 12: 
var inBody = document.getElementsByTagName("body").item(0); 
by 
var inBody = document.getElementsByTagName("div").item(0); 

In order to append the zoombox after the div, instead of the body tag. 

And it worked!!! ;-) 

Now I just have to customize the zoombox to make it larger (because it 
doesn't zoom very larger). 

Thanks, 

Charles 

Original comment by charles....@gmail.com on 24 Dec 2009 at 5:51