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i4uICBhIE1hYyBudXQuICBJIGhh dmUgbG90cyBvZiBNYWNzIGFuZCBsb3ZlIHRvIHVzZQ0KdGhlbS4gIFNvLCB5b3UgbmVlZCBhIE1h YyBkdWRlIGFuZCBub3cgeW91IGhhdmUgb25lLg0KCQ0KCUhhdmluZyBoYWQgdmVyeSBsaXR0bGUg dGltZSB0byB3b3JrIHdpdGggRHluQVBJIHNvIGZhciAoYQ0Kc2hvcnRjb21pbmcgSSBhbSBxdWlj a2x5IHdvcmtpbmcgb24gcmVjdGlmeWluZykgSSB3b3VsZCBsaWtlIHRvIGFzaw0KcmlnaHQgYXdh eSwgd2hhdCBhcmUgdGhlIGtub3duIG1ham9yIGJ1Z3Mgd2l0aCBNYWNzIGZvciBEeW5BUEk/ICBX aGVyZQ0Kd291bGQgeW91IGJlZ2luIGNvbmNlbnRyYXRpbmcgeW91ciBlZmZvcnRzIGlmIHlvdSB3 ZXJlIG1lPyAgSSBob3BlIHRvIGJlDQpvZiBzb21lIGhlbHAuLi4gDQoJDQoJUnlhbg0KCQ0KCV9f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X18NCglHZXQgYSBmcmVlLCBwZXJtYW5lbnQsIGVtYWlsIGFkZHJlc3MgYXQNCglodHRwOi8vZnJl ZW1haWwubnVjbGVhcmdvcGhlci5jb20hDQoJDQoJX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX18NCglEeW5hcGktRGV2IG1haWxpbmcgbGlzdA0KCUR5bmFwaS1E ZXZAbGlzdHMuc291cmNlZm9yZ2UubmV0DQoJaHR0cDovL2xpc3RzLnNvdXJjZWZvcmdlLm5ldC9s aXN0cy9saXN0aW5mby9keW5hcGktZGV2DQoJDQoNCg== |
From: Michael Br. <mb...@st...> - 2001-02-07 19:30:46
|
> My personal main problem on the mac is the getContentHeight/Width methods... > You cannot make layer, fill it, and have it autosize to its' contents. If I > am wrong about this someone please let me know. you are wrong!! check out the following: (btw: i already posted this a few days ago, but nobody noticed it, so i'm posting it again. i would be pleased to see some comments this time.) ie5/mac: this browser needs some time to update the scrollWidth/Height-values, so i store the old values of the contentSize and then call a function that loops with a timeout until the values have changed (or a maximum of retries is reached). the 'onload'-event isn't invoked until that moment. this means that everything that needs the size of the content has to wait for the 'onload'-event to be invoked. ns5: i found that elm.scrollWidth and elm.scrollHeight in ns5 contain the correct values if elm.style.width/height is set to 'auto', so what i did in Dynlayer.prototype.getContentWidth() is setting the elm.style.width to 'auto', retrive the scrollWidth, and then changing the value of elm.style.width again to the original value. this causes a short flickering, because when set to 'auto', ns5 adjust the size of the layer to the contentSize, but at least i get the correct size of the content. since the setHTML() method of a DynLayer is the only place where the size of the content can be changed there's no need for accessing the browsers object every time the contentsize is needed, so i introduced two new properties to the DynLayer: contentW and contentH (they are updated every time setHTML() is called) i made a demonstration page available on the web: http://n.ethz.ch/student/mibuerge/dynapi/examples/contentsize.htm the pieces of code i changed in "dynlayer.js": /* ... */ DynLayer.prototype.toString=function () { return (this.elm)?'DynAPI.getDocument("'+this.dyndoc.id+'").all["'+this.id+'"]':'Dy nLayer.unassigned["'+this.id+'"]'; }; // replaced check for this.created with this.elm /* ... */ DynLayer.prototype.setHTML=function(html,noevt) { this.html=html?html:''; if (this.css==null) return; this.invokeEvent("beforeload"); // saving the actual size of the content if (is.ie5 && is.platform == 'mac') { this.lastContentW = this.contentW || this.getContentWidth(); this.lastContentH = this.contentH || this.getContentHeight(); } this.elm.innerHTML=html; if (is.ns4) { this.doc.open(); this.doc.write(html); this.doc.close(); for (var i in this.doc.images) this.doc.images[i].lyrobj=this; for (i=0;i<this.doc.links.length;i++) this.doc.links[i].lyrobj=this; } else if (is.ns5) { while (this.elm.hasChildNodes()) this.elm.removeChild(this.elm.firstChild); var r=this.elm.ownerDocument.createRange(); r.selectNodeContents(this.elm); r.collapse(true); var df=r.createContextualFragment(html); this.elm.appendChild(df); for (var i in this.doc.images) this.doc.images[i].lyrobj=this.elm; } else { //for (var i in this.elm.all.tags("img")) this.elm.all.tags("img")[i].lyrobj=this; } this.updateContentSizeValues(noevt) }; /* ... */ DynLayer.prototype.getContentWidth=function() { if (this.elm==null) return 0; else if (is.ns4) return this.doc.width; else if (is.ns5) { this.elm.style.width = "auto"; // makes the offsetWidth available var w = this.elm.offsetWidth; this.elm.style.width = this.w; // restore the width return w; } else if (is.ie) return parseInt(this.elm.scrollWidth); else return 0; }; DynLayer.prototype.getContentHeight=function() { if (this.elm==null) return 0; else if (is.ns4) return this.doc.height; else if (is.ns5) { this.elm.style.height = "auto"; var h = this.elm.offsetHeight; this.elm.style.height = this.h; return h; } else if (is.ie) return parseInt(this.elm.scrollHeight); else return 0; }; DynLayer.prototype.updateContentSizeValues = function(noevt) { if (is.ie5 && is.platform == 'mac') { this.chkTimer = setTimeout(this + '.checkForContentSizeUpdate(1,'+!(noevt==false)+')',0); return; } this.contentW = this.getContentWidth(); this.contentH = this.getContentHeight(); if (noevt!=false) this.invokeEvent('load'); } DynLayer.prototype.checkForContentSizeUpdate = function(retry,noevt) { var w = this.getContentWidth(); var h = this.getContentHeight(); // check for changed values if (this.lastContentW != w || this.lastContentH != h) { this.lastContentW = this.lastContentH = null; this.contentW = w; this.contentH = h; if (noevt!=false) this.invokeEvent('load'); } else if (retry < DynLayer.maxRetries) { clearTimeout(this.chkTimer) setTimeout(this +'.check4ContentSizeUpdate(' +(retry+1) +','+!(noevt==false)+')',30); } else if (noevt!=false) this.invokeEvent('load'); } DynLayer.maxRetries = 5; /* ... */ -- Michael Buerge |
From: Liam C. <met...@ma...> - 2001-02-07 20:23:42
|
I don=B9t usually have much time to contribute as the discussions mainly take place outside my time-zone but Cameron Hart is on holiday, so here goes: I too am a Mac'o'phile and have been hanging out here for some months. <plug> you can see what Cameron and I have done with it at http://www.e4.com/ </unplug> Unfortunately lack of IE5Mac JS developer related material has slowed down my many efforts to improve the DynAPI in this direction, and for the worlds betterment. Cameron and I have been mainly concerned with IE5Mac and NN6 lately: 1) Getting LoadPanel and ScrollPane working - particularly capturing onLoad events, and applying this to the getContentWidth/Height problem (thanks to Michael for this). 2) Investigation the extent of actual DOM support and the event model using Brainjar's DOMviewer. 3) Checking and testing the core.api functionality to make sure it is rock-solid in IE5Mac/NN6 without interfering with the other browsers. 4) Extending common widgets. So far we are at the very much branched code stage of just trying to get things working, the successful route appears to be to treat IE5Mac as a variation of NN6 due to its DOM support, but it too has its rendering idiosyncrasies (see http://developer.apple.com/internet). Netscape on Mac is just fine - one in favour in the recent browser support discussion, along with the fact that IE5Mac, whilst Microsoft, might just a= s well be made by a 3rd Party. This is a professional effort, and whilst I know the DynAPI already has som= e fantastic effects built in (looking forward to playing with the anims), a stable core.api is what we are working towards for the next few months. I'd like to place offer my support with Ryan and other Mac developers - mak= e yourself known.=20 If I can help test others ideas on the Mac side, I am more than happy (we have a full test suite inc. OSX). Will keep you posted on our own developments of course - time is the enemy, not each other/browser developers. Full Mac compatibility in the core will make the DynAPI truly 'cross-platform' - and I for one would like to see what some of my creatives' can do with it (you'd be surprised how many a happily embracing programic animation in Flash without thinking they are getting technical!) Liam --=20 "Everything in moderation ... including moderation" pgp on request |
From: Michael Br. <mb...@st...> - 2001-02-07 21:56:41
|
[ ... ] > This is a professional effort, and whilst I know the DynAPI already has some > fantastic effects built in (looking forward to playing with the anims), a > stable core.api is what we are working towards for the next few months. i'm optimistic that it won't take months > I'd like to place offer my support with Ryan and other Mac developers - make > yourself known. finally some mac-developers showing up, hope this will lead to a better support for the mac. > If I can help test others ideas on the Mac side, I am more than happy (we > have a full test suite inc. OSX). Will keep you posted on our own > developments of course - time is the enemy, not each other/browser > developers. i'm letting you know when there is something. thx for the offer. > Full Mac compatibility in the core will make the DynAPI truly > 'cross-platform' - and I for one would like to see what some of my > creatives' can do with it (you'd be surprised how many a happily embracing > programic animation in Flash without thinking they are getting technical!) there isn't missing much. the main issue for me is getting the loadpanel working. -- Michael Buerge |
From: Richard B. <ma...@ri...> - 2001-02-08 02:49:18
|
> you can see what Cameron and I have done with it at http://www.e4.com/ Very nice effort!! Cheers, Richard Bennett ma...@ri... www.richardinfo.com (Everything running on, and ported to the 19/12/2000 snapshot of DynAPI2) ----- Original Message ----- From: "Liam Clancy" <met...@ma...> To: "dynapi dev lists.sourceforge.net" <dyn...@li...> Sent: Wednesday, February 07, 2001 9:19 PM Subject: [Dynapi-Dev] Mac DynAPI issues and Netscape 6 Discussion > I don¹t usually have much time to contribute as the discussions mainly take > place outside my time-zone but Cameron Hart is on holiday, so here goes: > > I too am a Mac'o'phile and have been hanging out here for some months. > > <plug> > you can see what Cameron and I have done with it at http://www.e4.com/ > </unplug> > > Unfortunately lack of IE5Mac JS developer related material has slowed down > my many efforts to improve the DynAPI in this direction, and for the worlds > betterment. > > Cameron and I have been mainly concerned with IE5Mac and NN6 lately: > > 1) Getting LoadPanel and ScrollPane working - particularly capturing onLoad > events, and applying this to the getContentWidth/Height problem (thanks to > Michael for this). > > 2) Investigation the extent of actual DOM support and the event model using > Brainjar's DOMviewer. > > 3) Checking and testing the core.api functionality to make sure it is > rock-solid in IE5Mac/NN6 without interfering with the other browsers. > > 4) Extending common widgets. > > So far we are at the very much branched code stage of just trying to get > things working, the successful route appears to be to treat IE5Mac as a > variation of NN6 due to its DOM support, but it too has its rendering > idiosyncrasies (see http://developer.apple.com/internet). > > Netscape on Mac is just fine - one in favour in the recent browser support > discussion, along with the fact that IE5Mac, whilst Microsoft, might just as > well be made by a 3rd Party. > > This is a professional effort, and whilst I know the DynAPI already has some > fantastic effects built in (looking forward to playing with the anims), a > stable core.api is what we are working towards for the next few months. > > I'd like to place offer my support with Ryan and other Mac developers - make > yourself known. > > If I can help test others ideas on the Mac side, I am more than happy (we > have a full test suite inc. OSX). Will keep you posted on our own > developments of course - time is the enemy, not each other/browser > developers. > > Full Mac compatibility in the core will make the DynAPI truly > 'cross-platform' - and I for one would like to see what some of my > creatives' can do with it (you'd be surprised how many a happily embracing > programic animation in Flash without thinking they are getting technical!) > > > > Liam > -- > "Everything in moderation ... including moderation" > > pgp on request > > > _______________________________________________ > Dynapi-Dev mailing list > Dyn...@li... > http://lists.sourceforge.net/lists/listinfo/dynapi-dev > ____________________________________________________________ > Get your free domain name and domain-based e-mail from > Namezero.com. New! Namezero Plus domains now available. > Find out more at: http://www.namezero.com > |
From: Jordi \ilMaestro\ M. <jmi...@or...> - 2001-02-08 09:02:18
|
I missed that one. I'll try and get these patches to CVS as soon as I can Michael Bürge wrote: > > My personal main problem on the mac is the getContentHeight/Width methods... > > You cannot make layer, fill it, and have it autosize to its' contents. If I > > am wrong about this someone please let me know. > > you are wrong!! > > check out the following: > (btw: i already posted this a few days ago, but nobody noticed it, so i'm > posting it again. i would be pleased to see some comments this time.) > > ie5/mac: > this browser needs some time to update the scrollWidth/Height-values, so i > store the old values of the contentSize and then call a function that loops > with a timeout until the values have changed (or a maximum of retries is > reached). the 'onload'-event isn't invoked until that moment. this means > that everything that needs the size of the content has to wait for the > 'onload'-event to be invoked. > > ns5: > i found that elm.scrollWidth and elm.scrollHeight in ns5 contain the correct > values if elm.style.width/height is set to 'auto', so what i did in > Dynlayer.prototype.getContentWidth() is setting the elm.style.width to > 'auto', retrive the scrollWidth, and then changing the value of > elm.style.width again to the original value. this causes a short flickering, > because when set to 'auto', ns5 adjust the size of the layer to the > contentSize, but at least i get the correct size of the content. > > since the setHTML() method of a DynLayer is the only place where the size of > the content can be changed there's no need for accessing the browsers object > every time the contentsize is needed, so i introduced two new properties to > the DynLayer: contentW and contentH (they are updated every time setHTML() > is called) > > i made a demonstration page available on the web: > http://n.ethz.ch/student/mibuerge/dynapi/examples/contentsize.htm > > the pieces of code i changed in "dynlayer.js": > > /* ... */ > > DynLayer.prototype.toString=function () { > return > (this.elm)?'DynAPI.getDocument("'+this.dyndoc.id+'").all["'+this.id+'"]':'Dy > nLayer.unassigned["'+this.id+'"]'; > }; > // replaced check for this.created with this.elm > > /* ... */ > > DynLayer.prototype.setHTML=function(html,noevt) { > this.html=html?html:''; > if (this.css==null) return; > this.invokeEvent("beforeload"); > > // saving the actual size of the content > if (is.ie5 && is.platform == 'mac') { > this.lastContentW = this.contentW || this.getContentWidth(); > this.lastContentH = this.contentH || this.getContentHeight(); > } > > this.elm.innerHTML=html; > if (is.ns4) { > this.doc.open(); > this.doc.write(html); > this.doc.close(); > for (var i in this.doc.images) this.doc.images[i].lyrobj=this; > for (i=0;i<this.doc.links.length;i++) > this.doc.links[i].lyrobj=this; > } > else if (is.ns5) { > while (this.elm.hasChildNodes()) > this.elm.removeChild(this.elm.firstChild); > var r=this.elm.ownerDocument.createRange(); > r.selectNodeContents(this.elm); > r.collapse(true); > var df=r.createContextualFragment(html); > this.elm.appendChild(df); > for (var i in this.doc.images) > this.doc.images[i].lyrobj=this.elm; > } > else { > //for (var i in this.elm.all.tags("img")) > this.elm.all.tags("img")[i].lyrobj=this; > } > this.updateContentSizeValues(noevt) > }; > > /* ... */ > > DynLayer.prototype.getContentWidth=function() { > if (this.elm==null) return 0; > else if (is.ns4) return this.doc.width; > else if (is.ns5) { > this.elm.style.width = "auto"; // makes the offsetWidth available > var w = this.elm.offsetWidth; > this.elm.style.width = this.w; // restore the width > return w; > } > else if (is.ie) return parseInt(this.elm.scrollWidth); > else return 0; > }; > DynLayer.prototype.getContentHeight=function() { > if (this.elm==null) return 0; > else if (is.ns4) return this.doc.height; > else if (is.ns5) { > this.elm.style.height = "auto"; > var h = this.elm.offsetHeight; > this.elm.style.height = this.h; > return h; > } > else if (is.ie) return parseInt(this.elm.scrollHeight); > else return 0; > }; > DynLayer.prototype.updateContentSizeValues = function(noevt) { > if (is.ie5 && is.platform == 'mac') { > this.chkTimer = setTimeout(this + > '.checkForContentSizeUpdate(1,'+!(noevt==false)+')',0); > return; > } > > this.contentW = this.getContentWidth(); > this.contentH = this.getContentHeight(); > if (noevt!=false) this.invokeEvent('load'); > } > > DynLayer.prototype.checkForContentSizeUpdate = function(retry,noevt) { > var w = this.getContentWidth(); > var h = this.getContentHeight(); > // check for changed values > if (this.lastContentW != w || this.lastContentH != h) { > this.lastContentW = this.lastContentH = null; > this.contentW = w; > this.contentH = h; > if (noevt!=false) this.invokeEvent('load'); > } > else if (retry < DynLayer.maxRetries) { > clearTimeout(this.chkTimer) > setTimeout(this +'.check4ContentSizeUpdate(' +(retry+1) > +','+!(noevt==false)+')',30); > } > else if (noevt!=false) this.invokeEvent('load'); > > } > DynLayer.maxRetries = 5; > > /* ... */ > > -- > Michael Buerge > > _______________________________________________ > Dynapi-Dev mailing list > Dyn...@li... > http://lists.sourceforge.net/lists/listinfo/dynapi-dev |