Bugs item #1028709, was opened at 2004-09-15 10:49
Message generated for change (Comment added) made by doug_melvin
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105757&aid=1028709&group_id=5757
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: DynAPI 3 API
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Max (max_boyko)
Assigned to: Nobody/Anonymous (nobody)
Summary: autoresizing with setHTML
Initial Comment:
Let us consider the setting next HTML for DynLayer
which have not fixed size (we expect that layer should
be auto-resized to the content size):
var dlr = new DynLayer();
dlr.setHTML("Test<img
src='http://www.google.com/images/logo.gif'>");
dynapi.document.addChild(dlr);
If the image in HTML (<img
src='http://www.google.com/images/logo.gif'>) isnt
cached by the browser early then we have problem with
auto-resizing of the layer.
The core place in code (I consider the case of DOM
browser only) is: dynlayer_dom.js, line 47, in function
DynLayer._assignElement, where we call
dlyr.setSize(cw,ch). At the moment of calling
_assignElement we have incorrect values for
getContentWidth and getContentHeight yet and so we set
the wrong size to the layer
I think we should resize layer when the DynLayer
completes the job by loading all resources (images and
etc.) Unfortunately I dont know how to detect the
finish of all jobs during the changing innerHTML of
element (our case)
I attached the test file which doesnt work on IE and
Mozilla
----------------------------------------------------------------------
Comment By: Doug Melvin (doug_melvin)
Date: 2005-09-01 13:19
Message:
Logged In: YES
user_id=184788
Checking for completiong can be done in IE using the
onreadystatechange event and then checking if readyState == 4
I _think_ readystate 4 = finished rendering, but you will
want to test to be sure.
This event is not very well documented at all and was only
found after about 4 months of trying to solve an "images
abort loading" issue we where having oh-so long ago.
Also note: I have absolutly no idea how to do this in
Mozilla but give me time :-P
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105757&aid=1028709&group_id=5757
|