From: Guangyi Wu <gua...@al...> - 2000-12-04 11:34:10
|
Finally the label example works on my IE 5.00.2314.1003 and NN 4.5. There are two modified files, label.js and events.js in the zipped attachment. Following is a summary of modification: In label.js 1. Sets point size and font family only when valus are available. (For the old NN) 2. Overload DynLayer.setWidth() to add setText() for old NN before invokeEvent('resize'). Otherwise, the width is not resized in the old NN. 3. Use this.css.cursor='default' for IE to keep the default cursor. Because the this.css exists only after creation, the oncreate event handler and a flag selectable are added. In events.js 4. Add elm.onmousemove in DynLayer.captureMouseEvents(). I had been blocked and keeping wondered for a long while until I noticed the label's onmousemove() was not called. 5. use this.lyrobj instead of dyndoc as src in DynLayer.EventMethod(). Pascal, You are an expert at this case, could you explain the reason for me if I am wrong. I tested the example dynapi.gui.label in 12.01-beta, and I got the tag of e.srcElement is <TD> for JSDynLayer2. It seems to me this.lyrobj is a better choice as "src" than dyndoc, because "this" layer registered itself to the event and it can be lower than the dyndoc. 6. add if (is.ie) { if (evt.browserReturn==false) e.returnValue=false } in EventMethod() after bubbleEvent() for IE. George |