|
||||
[Chameleon] DHTML image gets shiftedPaul Spencer spencer@dmsolutions.caThu, 01 Apr 2004 15:19:22 -0500
|
In the latest cvs version, this issue and related issues should be fixed. The problem is that different browsers can resolve page layout in different orders. We had made the assumption that by positioning the map image in the script after the </body> tag, the browser would have completed all calculations and the image would be positioned correctly. This is not (apparently) the case. Now the map image is positioned as part of the page's onload event and appears correctly in every circumstance we can invent. As a side benefit we have added a hook to the page's onresize event which correctly repositions the map image when resizing the page in IE (netscape/mozilla submits after a resize so it was less of an issue). This would only happen if the html in the page was designed to move if the page resized, for instance if a table is fixed width and centered. Cheers, Paul bartvde@xs4all.nl wrote: > Hi Jacob, > > there was a pretty extended discussion about this in January, see this > thread: > > http://lists.maptools.org/pipermail/chameleon/2004-January/000299.html > > Best regards, > Bart > > >>Hi List, >> >>I got a little bug in the chameleon site I built (version 1.0.4). It's >>something that happens only sometimes (most enjoyable kind of bug to fix). >>When the page loads for the first time, the DHTML image tends to show up >>shifted roughly 250 pixels to the right. After I either refresh or >>re-submit, it's mostly okay again. It happens more frequently if the >>connection is slower. I was wondering if this is a known issue, and if >>there >>is a quick fix. I suspect that it's a problem with the order in which >>things >>get initialised. I was thinking of running a function on the 'onload' >>event >>which forces the image in the right spot. But I'm not too clear about how >>I'd actually move the DHTML image (or the DIV it sits in) without messing >>up >>other things. Any ideas? >> >>The site runs at http://spatial.hgm.com.au/cwcroe7/cwc2.php >><http://spatial.hgm.com.au/cwcroe7/cwc2.php> (internet explorer >>oriented... >>sorry) >> >>Regards, >> >>Jacob >> >> >> >>JACOB DELFOS >>SPATIAL INFORMATION ANALYST >>Maunsell Australia Pty Ltd >>629 Newcastle Street >>PO Box 81 >>Leederville 6902 >>Western Australia >>ABN 20 093 846 925 >> >>Tel + 61 8 9281 6185 >>Fax + 61 8 9281 6297 >>jacob.delfos@maunsell.com >> >> > > > _______________________________________________ > Chameleon mailing list > Chameleon@lists.maptools.org > http://lists.maptools.org/mailman/listinfo/chameleon > -- ----------------------------------------------------------------- |Paul Spencer pspencer@dmsolutions.ca | |-----------------------------------------------------------------| |Applications & Software Development | |DM Solutions Group Inc http://www.dmsolutions.ca/| -----------------------------------------------------------------
This archive was generated by Pipermail. |
MapTools.org -- Hosted by DM Solutions Group |