Update of /cvsroot/dynapi/dynapi/src/lib/dynapi/api
In directory usw-pr-cvs1:/tmp/cvs-serv30523/src/lib/dynapi/api
Modified Files:
dyndocument.js dynlayer.js
Removed Files:
.jspack dragevent.js events.js
Log Message:
Imported DynAPIX
Index: dyndocument.js
===================================================================
RCS file: /cvsroot/dynapi/dynapi/src/lib/dynapi/api/dyndocument.js,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** dyndocument.js 2001/02/25 12:19:31 1.9
--- dyndocument.js 2001/03/25 06:04:16 1.10
***************
*** 4,59 ****
The DynAPI Distribution is distributed under the terms of the GNU LGPL license.
! */
! function DynDocument(frame) {
this.elm = frame;
- this.elm.lyrobj = this;
this.doc = frame.document;
! this.doc.lyrobj = this;
! this.all = [];
! this.children = [];
! this.id = frame.name||"DynDocument"+DynDocument.nullCount++;
!
! frame.onresize = DynAPI.resizeHandler;
! this.dyndoc = this;
this.fgColor = this.doc.fgColor||'';
this.bgColor = this.doc.bgColor||'';
! frame.dyndoc = this;
!
! DynDocument.dyndocs[DynDocument.dyndocs.length]=this;
! DynDocument.dyndocsID[this.id]=this;
! return this;
}
! DynDocument.dyndocs = [];
! DynDocument.dyndocsID = [];
! DynDocument.nullCount=0;
! DynDocument.prototype.isChild = false;
! DynDocument.prototype.created = true;
DynDocument.prototype.isDynDocument = true;
! DynDocument.prototype.toString=function() {
! return "DynAPI.getDocument('"+this.id+"')";
};
! DynDocument.prototype.getClass = DynLayer.prototype.getClass;
! DynDocument.prototype.addChild = DynLayer.prototype.addChild;
! DynDocument.prototype.removeChild = DynLayer.prototype.removeChild;
! DynDocument.prototype.deleteChild = DynLayer.prototype.deleteChild;
! DynDocument.prototype.deleteAllChildren = DynLayer.prototype.deleteAllChildren;
! DynDocument.prototype.addChildID = DynLayer.prototype.addChildID;
!
! DynDocument.prototype.recreateAll = function() {
! if (!is.ns4) return;
! this.setBgColor(this.bgColor);
! this.setFgColor(this.fgColor);
! for (var i in this.all) {
! this.all[i].elm = null;
! }
! for (var i=0; i<this.children.length; i++) {
! this.children[i].deleteElement();
! this.children[i].createElement();
! }
! };
! DynDocument.prototype.getBgColor = DynLayer.prototype.getBgColor;
! DynDocument.prototype.getX=DynDocument.prototype.getY =
DynDocument.prototype.getPageX = DynDocument.prototype.getPageY = function() {
! return 0;
};
DynDocument.prototype.getWidth = function() {
if (!this.w) this.findDimensions();
--- 4,30 ----
The DynAPI Distribution is distributed under the terms of the GNU LGPL license.
! */
! DynDocument = function(frame) {
! this.DynObject = DynObject
! this.DynObject()
this.elm = frame;
this.doc = frame.document;
! this.frame = frame;
this.fgColor = this.doc.fgColor||'';
this.bgColor = this.doc.bgColor||'';
! this.elm.lyrobj=this;this.doc.lyrobj=this;
! this.findDimensions();
}
! DynDocument.prototype = new DynObject();
DynDocument.prototype.isDynDocument = true;
! DynDocument.prototype.getBgColor = function() {
! return this.bgColor;
};
! DynDocument.prototype.specificCreate=function() {
};
+ DynDocument.prototype.getX=function() { return 0; };
+ DynDocument.prototype.getY=function() { return 0; };
+ DynDocument.prototype.getPageX=function() { return 0; };
+ DynDocument.prototype.getPageY=function() { return 0; };
DynDocument.prototype.getWidth = function() {
if (!this.w) this.findDimensions();
***************
*** 83,84 ****
--- 54,56 ----
this.doc.location = path;
};
+ DynAPI.addLoadFunction("DynAPI.document = DynAPI.addChild(new
+DynDocument(self));DynAPI.document.all = DynObject.all;")
Index: dynlayer.js
===================================================================
RCS file: /cvsroot/dynapi/dynapi/src/lib/dynapi/api/dynlayer.js,v
retrieving revision 1.36
retrieving revision 1.37
diff -C2 -r1.36 -r1.37
*** dynlayer.js 2001/03/22 18:01:46 1.36
--- dynlayer.js 2001/03/25 06:04:16 1.37
***************
*** 6,62 ****
*/
function DynLayer() {
! this.html=null;
! this.bgImage=null;
!
! var a=arguments;
! if (a.length==1 && a[0]!=null && typeof(a[0])=="object") this.setStyle(a[0]);
! else {
! this.id=a[0]||"JSDynLayer"+(DynLayer.nullCount++);
! this.x=a[1]||0;
! this.y=a[2]||0;
! this.w=a[3]||null;
! this.h=a[4]||null;
! this.bgColor=a[5]||null;
! this.visible=(a[6]!=false && a[6]!='hidden');
! this.z=a[7]||null;
! this.bgImage=a[8]||null;
! }
! this.children=[];
! this.parent=null;
! this.isChild=false;
! this.created=false;
this.elm=null;
this.doc=null;
this.css=null;
-
- DynLayer.unassigned[this.id]=this;
- }
! DynLayer.unassigned=[];
! DynLayer.nullCount=0;
! DynLayer.prototype.createElement=function() {
if (this.created||!this.parent||this.elm!=null) return;
- if (this.parent.isDocument) this.dyndoc=this.parent; else
this.dyndoc=this.parent.dyndoc;
! if (is.def) {
var
parentElement=(this.parent.isDynLayer)?this.parent.elm:this.parent.doc.body;
! if (is.ie4) {
! var code='<DIV id="'+this.id+'" style="position:absolute;
left:0px; top:0px; width:'+this.w+'px;"></DIV>';
! parentElement.insertAdjacentHTML("beforeEnd", code);
!
this.elm=parentElement.children[parentElement.children.length-1];
! this.css=this.elm.style;
! } else {
!
parentElement.appendChild(this.elm=this.dyndoc.doc.createElement("DIV"));
! this.elm.style.position="absolute";
! this.elm.id=this.id;
! this.css=this.elm.style;
! }
this.doc=this.parent.doc;
! } else {
var recycled=this.parent.doc.recycled;
if (recycled && recycled.length>0) {
! this.elm=recycled[0];
! DynAPI.removeFromArray(recycled,recycled[0]);
} else {
this.elm=new Layer(this.w,this.parent.elm);
--- 6,54 ----
*/
function DynLayer() {
! this.DynObject = DynObject;
! this.DynObject();
this.elm=null;
this.doc=null;
this.css=null;
! var a=arguments
! if(a[0]) this.setID(a[0])
! this.x=a[1]||0;
! this.y=a[2]||0;
! this.w=a[3]||null;
! this.h=a[4]||null;
! this.bgColor=a[5]||null;
! this.visible=(a[6]!=false && a[6]!='hidden');
! this.z=a[7]||null;
! this.bgImage=a[8]||null;
! this.html=null;
! };
! DynLayer.prototype = new DynObject();
! DynLayer.prototype.isDynLayer = true;
! DynLayer.prototype.specificCreate=function() {
if (this.created||!this.parent||this.elm!=null) return;
! if (is.ns6) {
var
parentElement=(this.parent.isDynLayer)?this.parent.elm:this.parent.doc.body;
! this.doc=this.parent.doc;
! var r = parentElement.ownerDocument.createRange()
! r.setStartBefore(parentElement);
! ptxt = r.createContextualFragment(this.getOuterHTML());
! parentElement.appendChild(ptxt);
! this.elm=parentElement.lastChild;
! this.css=this.elm.style;
! } else if (is.ie) {
! var
parentElement=(this.parent.isDynLayer)?this.parent.elm:this.parent.doc.body;
! var code=this.getOuterHTML();
! parentElement.insertAdjacentHTML("beforeEnd", code);
! this.elm=parentElement.children[parentElement.children.length-1];
! this.css=this.elm.style;
this.doc=this.parent.doc;
! } else if (is.ns4) {
var recycled=this.parent.doc.recycled;
if (recycled && recycled.length>0) {
! this.elm=recycled[0];
! Methods.removeFromArray(recycled,recycled[0]);
} else {
this.elm=new Layer(this.w,this.parent.elm);
***************
*** 67,84 ****
this.doc=this.elm.document;
this.doc.lyrobj=this;
- }
- this.elm.lyrobj=this;
- this.flagPrecreate(this);
-
- if (is.def) {
- if (this.w) this.css.width=this.w;
- if (this.h) this.css.height=this.h;
- if (!this.clip) this.css.clip='rect(0px '+(this.w||0)+'px
'+(this.h||0)+'px 0px)';
- this.css.left=this.x;
- this.css.top=this.y;
- this.setHTML(this.getInnerHTML(),false);
- if (is.ie) for (i in this.elm.all.tags("img"))
this.elm.all.tags("img")[i].lyrobj=this;
- else if (is.ns6) for (i in this.doc.images)
this.doc.images[i].lyrobj=this.elm;
- } else if (is.ns4) {
if (this.w) this.css.clip.width=this.w;
if (this.h) this.css.clip.height=this.h;
--- 59,62 ----
***************
*** 86,124 ****
this.doc.write(this.getInnerHTML());
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;
}
! if (this.bgColor!=null) this.setBgColor(this.bgColor);
! if (this.bgImage!=null) this.setBgImage(this.bgImage);
! else if (is.ie55 && this.bgImage==null && this.html==null)
this.setBgImage('javascript:null');
! if (this.clip) this.setClip(this.clip)
!
! if (this.z) this.css.zIndex=this.z;
! this.css.visibility=this.visible? "inherit" : (is.ns4?"hide":"hidden");
!
this.assignChildren();
-
if (this.html!=null) {
if (this.w==null && this.getContentWidth()>0)
this.setWidth(this.getContentWidth(), false);
if (this.h==null && this.getContentHeight()>0)
this.setHeight(this.getContentHeight(), false);
}
- this.created=true;
- if (this.hasEventListeners) this.captureMouseEvents();
- this.invokeEvent('create');
this.invokeEvent("resize");
};
! DynLayer.prototype.deleteElement=function() {
! this.flagDeleteChildren(this);
! if (this.elm) {
! if (is.def) {
! this.elm.style.visibility = "hidden";
! this.elm.innerHTML = "";
! this.elm.outerHTML = "";
! if (is.ie5 && is.platform=="win32" &&
this.elm.children.length>0) this.elm.removeNode(true);
! } else if (is.ns4) {
! this.elm.visibility = "hide";
! this.elm.releaseEvents(Event.LOAD);
}
}
this.elm = null;
this.doc = null;
--- 64,128 ----
this.doc.write(this.getInnerHTML());
this.doc.close();
+ if (this.bgColor!=null) this.setBgColor(this.bgColor);
+ if (this.bgImage!=null) this.setBgImage(this.bgImage);
+ if (this.clip) this.setClip(this.clip)
+ if (this.z) this.css.zIndex=this.z;
+ this.css.visibility=this.visible? "inherit" : (is.ns4?"hide":"hidden");
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;
}
! this.frame=this.parent.frame
! this.elm.lyrobj=this;
this.assignChildren();
if (this.html!=null) {
if (this.w==null && this.getContentWidth()>0)
this.setWidth(this.getContentWidth(), false);
if (this.h==null && this.getContentHeight()>0)
this.setHeight(this.getContentHeight(), false);
}
this.invokeEvent("resize");
};
! DynLayer.prototype.assignChildren=function() {
! var l=this.children.length;
! if(is.def) {
! for (var i=0; i<l; i++) {
! var child=this.children[i];
! if (is.ie) var elm=this.elm.all[child.id];
! else var elm=this.doc.getElementById(child.id);
! child.elm=elm;
! child.css=child.elm.style;
! child.doc=this.doc;
! child.elm.lyrobj=child;
! child.frame=this.frame;
! child.assignChildren();
! child.invokeEvent("resize");
! if (child.z) child.css.zIndex=child.z;
! }
! } else if(is.ns4) {
! for (var i=0; i<l; i++) {
! var child=this.children[i];
! var elm=this.doc.layers[child.id];
! child.elm=elm;
! child.css=elm;
! child.doc=elm.document;
! child.doc.lyrobj=child;
! child.elm.lyrobj=child;
! child.assignChildren();
! child.invokeEvent("resize");
! if (child.z) child.css.zIndex=child.z;
}
}
+ };
+ DynLayer.prototype.specificRemove=function() {
+ if (is.def) {
+ this.elm.style.visibility = "hidden";
+ this.elm.innerHTML = "";
+ this.elm.outerHTML = "";
+ if (is.ie5 && is.win32 && this.elm.children.length>0)
+this.elm.removeNode(true);
+ }
+ else if (is.ns4 && this.elm) {
+ if (!this.parent.doc.recycled) this.parent.doc.recycled=[];
+ this.parent.doc.recycled[this.parent.doc.recycled.length]=this.elm;
+ this.elm.visibility = "hide";
+ this.elm.releaseEvents(Event.LOAD);
+ }
this.elm = null;
this.doc = null;
***************
*** 126,298 ****
this.created = false;
};
- DynLayer.prototype.assignElement=function(elm) {
- this.elm=elm;
- if (is.def) {
- this.css=this.elm.style;
- this.doc=this.parent.doc;
- if (is.ie) for (i in this.elm.all.tags("img"))
this.elm.all.tags("img")[i].lyrobj=this;
- else if (is.ns6) for (i in this.doc.images)
this.doc.images[i].lyrobj=this.elm;
- } else if (is.ns4) {
- this.css=elm;
- this.doc=elm.document;
- this.doc.lyrobj=this;
- 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;
- }
- this.elm.lyrobj=this;
- };
- DynLayer.prototype.assignChildren=function() {
- this.dyndoc.all[this.id]=this;
- var cl=this.children.length;
- for (var i=0; i<cl; i++) {
- var child=this.children[i];
- this.dyndoc.all[child.id]=child;
- child.dyndoc=this.dyndoc;
- if (is.ns4) var elm=this.doc.layers[child.id];
- else if (is.ie) var elm=this.elm.all[child.id];
- else var elm=this.doc.getElementById(child.id);
- child.assignElement(elm);
- child.assignChildren();
- if (child.html!=null && (child.w==null || child.h==null)) {
- if (child.w==null && child.getContentWidth()>0)
child.setWidth(child.getContentWidth(),false);
- if (child.h==null && child.getContentHeight()>0)
child.setHeight(child.getContentHeight(),false);
- }
- child.invokeEvent("resize");
- if (child.z) child.css.zIndex=child.z;
- child.created=true;
- if (child.hasEventListeners) child.captureMouseEvents();
- child.invokeEvent('create');
- }
- };
- DynLayer.prototype.flagPrecreate=function() {
- var cl=this.children.length
- for (var i=0; i<cl; i++) { this.children[i].flagPrecreate(); }
- this.invokeEvent('precreate');
- }
- DynLayer.prototype.flagDeleteChildren=function() {
- for (var i=0; i<this.children.length; i++) {
- if (this.children[i].created) this.children[i].flagDeleteChildren();
- }
- this.invokeEvent('delete');
- };
- DynLayer.prototype.isDynLayer = true;
- DynLayer.prototype.getClass=function() {
- return this.constructor;
- };
- DynLayer.prototype.toString=function () {
- return
(this.created)?'DynAPI.getDocument("'+this.dyndoc.id+'").all["'+this.id+'"]':'DynLayer.unassigned["'+this.id+'"]';
- };
- DynLayer.prototype.addChild=function(child) {
- if (child.created) child.removeFromParent();
- child.parent=this;
- child.isChild=true;
- this.children[this.children.length]=child;
- if (this.created) child.createElement();
- return child;
- };
- DynLayer.prototype.removeChild=function(child) {
- if (child.parent==this) {
- DynAPI.removeFromArray(this.children,child);
- DynAPI.removeFromArray(this.dyndoc.all,child,true);
- DynLayer.unassigned[child.id]=child;
- child.deleteElement();
- child.parent=null;
- child.isChild=false;
- }
- return child;
- };
- DynLayer.prototype.removeFromParent=function() { if (this.parent!=null)
this.parent.removeChild(this); };
- DynLayer.prototype.deleteChild=function(child) {
- if (child.parent == this) {
- child.deleteAllChildren();
- child.invokeEvent('delete');
- DynAPI.removeFromArray(this.children,child);
- DynAPI.removeFromArray(this.dyndoc.all,child,true);
- if (is.ns4 && child.elm) {
- if (!this.doc.recycled) this.doc.recycled=[];
- this.doc.recycled[this.doc.recycled.length]=child.elm;
- }
- child.deleteElement(child);
- child.parent=null;
- child.isChild=false;
- }
- };
- DynLayer.prototype.deleteAllChildren=function() {
- for (var i in this.children) {
- this.children[i].deleteAllChildren();
- this.children[i].invokeEvent('delete');
- DynAPI.removeFromArray(this.dyndoc.all,this.children[i],true);
- if (is.ns4 && this.children[i].elm) {
- if (!this.doc.recycled) this.doc.recycled=[];
-
this.doc.recycled[this.doc.recycled.length]=this.children[i].elm;
- }
- this.children[i].deleteElement(this.children[i]);
- this.children[i].parent=null;
- this.children[i].isChild=false;
- }
- this.children=[];
- };
- DynLayer.prototype.deleteFromParent=function() {
- this.parent.deleteChild(this)
- };
DynLayer.prototype.getInnerHTML=function() {
var s="";
if (this.html!=null) s+=this.html;
! for (var i=0;i<this.children.length;i++)
s+=this.getOuterHTML(this.children[i]);
return s;
};
if (is.def) {
! DynLayer.prototype.getOuterHTML=function(dlyr) {
! var s='<div id="'+dlyr.id+'" style="';
! if (dlyr.visible==false) s+=' visibility:hidden;';
! if (dlyr.x!=null) s+=' left:'+dlyr.x+'px;';
! if (dlyr.y!=null) s+=' top:'+dlyr.y+'px;';
! if (dlyr.w!=null) s+=' width:'+dlyr.w+'px;';
! if (dlyr.h!=null) s+=' height:'+dlyr.h+'px;';
! if (dlyr.clip) s+=' clip:rect('+dlyr.clip[0]+'px '+dlyr.clip[1]+'px
'+dlyr.clip[2]+'px '+dlyr.clip[3]+'px);';
! else if (dlyr.w!=null && dlyr.h!=null);
! s+=' clip:rect(0px '+dlyr.w+'px '+dlyr.h+'px 0px);';
! if (dlyr.z) s+=' zIndex='+dlyr.z;
! if (dlyr.bgImage!=null) s+=' background-image:url('+dlyr.bgImage+');'
! if (dlyr.bgColor!=null) s+=' background-color:'+dlyr.bgColor+';'
! if (is.ie55 && dlyr.bgImage==null && dlyr.html==null) s+='
background-image:url(javascript:null);'
s+=' position:absolute;">';
! if (dlyr.html!=null) s+=dlyr.html;
! for (var i=0; i<dlyr.children.length; i++)
s+=this.getOuterHTML(dlyr.children[i]);
s+='</div>';
return s;
};
} else if (is.ns4) {
! DynLayer.prototype.getOuterHTML=function(dlyr) {
! var s='\n<layer id="'+dlyr.id+'"';
! if (dlyr.visible==false) s+=' visibility="hide"';
! if (dlyr.x!=null) s+=' left='+dlyr.x;
! if (dlyr.y!=null) s+=' top='+dlyr.y;
! if (dlyr.w!=null) s+=' width='+dlyr.w;
! if (dlyr.h!=null) s+=' height='+dlyr.h;
! if (dlyr.clip) s+='
clip="'+dlyr.clip[3]+','+dlyr.clip[0]+','+dlyr.clip[1]+','+dlyr.clip[2]+'"';
! else if (dlyr.w!=null && dlyr.h!=null);
! s+=' clip="0,0,'+dlyr.w+','+dlyr.h+'"';
! if (dlyr.z) s+=' zIndex='+dlyr.z;
! if (dlyr.bgImage!=null) s+=' background="'+dlyr.bgImage+'"';
! if (dlyr.bgColor!=null) s+=' bgcolor="'+dlyr.bgColor+'"';
s+='>';
! if (dlyr.html!=null) s+=dlyr.html;
! for (var i=0; i<dlyr.children.length; i++)
s+=this.getOuterHTML(dlyr.children[i]);
s+='</layer>';
return s;
};
};
! DynLayer.prototype.setStyle=function (s) {
! var
id=s.id,x=s.left,y=s.top,w=s.width,h=s.height,i=s.backgroundImage,c=s.backgroundColor,v=s.visibility,z=s.zIndex;
! if (!this.id && !this.created) this.id=id||"JSDynLayer"+(DynLayer.nullCount++);
! if (x!=null||y!=null) this.moveTo(x,y);
! if (w!=null||h!=null) this.setSize(w,h);;
! if (i!=null) this.setBgImage(i);
! if (c!=null) this.setBgColor(c);
! if (z!=null) this.setZIndex(z);
! this.setVisible(v!='hidden');
! };
if (is.ns) {
DynLayer.prototype._setX=function(){ this.css.left=this.x; }
--- 130,185 ----
this.created = false;
};
DynLayer.prototype.getInnerHTML=function() {
var s="";
if (this.html!=null) s+=this.html;
! var l=this.children.length;
! for (var i=0;i<l;i++) s+=this.children[i].getOuterHTML();
return s;
};
if (is.def) {
! DynLayer.prototype.getOuterHTML=function() {
! var s='<div id="'+this.id+'" style="';
! if (this.visible==false) s+=' visibility:hidden;';
! if (this.x!=null) s+=' left:'+this.x+'px;';
! if (this.y!=null) s+=' top:'+this.y+'px;';
! if (this.w!=null) s+=' width:'+this.w+'px;';
! if (this.h!=null) s+=' height:'+this.h+'px;';
! if (this.clip) s+=' clip:rect('+this.clip[0]+'px '+this.clip[1]+'px
'+this.clip[2]+'px '+this.clip[3]+'px);';
! else if (this.w!=null && this.h!=null);
! s+=' clip:rect(0px '+this.w+'px '+this.h+'px 0px);';
! if (this.z) s+=' z-index='+this.z+';';
! if (this.bgImage!=null) s+=' background-image:url('+this.bgImage+');'
! if (this.bgColor!=null) s+=' background-color:'+this.bgColor+';'
! if (is.ie55 && this.bgImage==null && this.html==null) s+='
background-image:url(javascript:null);'
s+=' position:absolute;">';
! if (this.html!=null) s+=this.html;
! for (var i=0; i<this.children.length; i++)
s+=this.children[i].getOuterHTML();
s+='</div>';
return s;
+
};
} else if (is.ns4) {
! DynLayer.prototype.getOuterHTML=function() {
! var s='\n<layer id="'+this.id+'"';
! if (this.visible==false) s+=' visibility="hide"';
! if (this.x!=null) s+=' left='+this.x;
! if (this.y!=null) s+=' top='+this.y;
! if (this.w!=null) s+=' width='+this.w;
! if (this.h!=null) s+=' height='+this.h;
! if (this.clip) s+='
clip="'+this.clip[3]+','+this.clip[0]+','+this.clip[1]+','+this.clip[2]+'"';
! else if (this.w!=null && this.h!=null);
! s+=' clip="0,0,'+this.w+','+this.h+'"';
! if (this.z) s+=' zIndex='+this.z;
! if (this.bgImage!=null) s+=' background="'+this.bgImage+'"';
! if (this.bgColor!=null) s+=' bgcolor="'+this.bgColor+'"';
s+='>';
! if (this.html!=null) s+=this.html;
! for (var i=0; i<this.children.length; i++)
s+=this.children[i].getOuterHTML();
s+='</layer>';
return s;
};
};
!
if (is.ns) {
DynLayer.prototype._setX=function(){ this.css.left=this.x; }
***************
*** 301,305 ****
DynLayer.prototype._setX=function(){ this.css.pixelLeft=this.x; }
DynLayer.prototype._setY=function(){ this.css.pixelTop=this.y; }
! }
DynLayer.prototype.moveTo=function(x,y) {
if (x!=null) this.x=x;
--- 188,193 ----
DynLayer.prototype._setX=function(){ this.css.pixelLeft=this.x; }
DynLayer.prototype._setY=function(){ this.css.pixelTop=this.y; }
! };
!
DynLayer.prototype.moveTo=function(x,y) {
if (x!=null) this.x=x;
***************
*** 390,407 ****
if (is.ns4) {
DynLayer.prototype._setHTML=function(html) {
! sTmp=(this.w==null)?'<NOBR>'+this.html+'</NOBR>':this.html
this.doc.open()
this.doc.write(sTmp)
this.doc.close()
! for (var i in this.doc.images) this.doc.images[i].lyrobj=this;
! for (var i=0;i<this.doc.links.length;i++) this.doc.links[i].lyrobj=this;
}
} else if (is.ie) {
! DynLayer.prototype._setHTML=function(html) {
! this.elm.innerHTML=html;
! for (var i in this.elm.all.tags("img"))
this.elm.all.tags("img")[i].lyrobj=this;
! }
} else {
! DynLayer.prototype._setHTML=function(html) {
sTmp=(this.w==null)?'<NOBR>'+this.html+'</NOBR>':this.html;
while (this.elm.hasChildNodes())
this.elm.removeChild(this.elm.firstChild);
--- 278,292 ----
if (is.ns4) {
DynLayer.prototype._setHTML=function(html) {
! var sTmp=(this.w==null)?'<NOBR>'+this.html+'</NOBR>':this.html
this.doc.open()
this.doc.write(sTmp)
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.ie) {
! DynLayer.prototype._setHTML=function(html) { for (i in
this.elm.all.tags("img")) this.elm.all.tags("img")[i].lyrobj=this }
} else {
! DynLayer.prototype._setHTML=function(html) {;
sTmp=(this.w==null)?'<NOBR>'+this.html+'</NOBR>':this.html;
while (this.elm.hasChildNodes())
this.elm.removeChild(this.elm.firstChild);
***************
*** 411,422 ****
var df=r.createContextualFragment(sTmp);
this.elm.appendChild(df);
- for (var i in this.doc.images) this.doc.images[i].lyrobj=this.elm;
}
! }
DynLayer.prototype.setHTML=function(html,noevt) {
this.html=html?html:'';
! if (this.platform=='mac') this.html+='\n';
if (this.css==null) return;
if (noevt!=false) this.invokeEvent("beforeload");
this._setHTML(html);
if (noevt!=false) this.invokeEvent("load");
--- 296,307 ----
var df=r.createContextualFragment(sTmp);
this.elm.appendChild(df);
}
! };
DynLayer.prototype.setHTML=function(html,noevt) {
this.html=html?html:'';
! if (is.mac) this.html+='\n';
if (this.css==null) return;
if (noevt!=false) this.invokeEvent("beforeload");
+ this.elm.innerHTML=html;
this._setHTML(html);
if (noevt!=false) this.invokeEvent("load");
***************
*** 467,471 ****
this.elm.offsetWidth //Mac hack, forces scrollWidth to
fill due to IE 5 mac bug
return parseInt(this.elm.scrollWidth);
! }
else {
this.elm.style.width = "auto";
--- 352,356 ----
this.elm.offsetWidth //Mac hack, forces scrollWidth to
fill due to IE 5 mac bug
return parseInt(this.elm.scrollWidth);
! }
else {
this.elm.style.width = "auto";
***************
*** 481,492 ****
if (is.ns4) return this.doc.height;
else if (is.ie) {
! this.elm.offsetHeight //Mac hack, forces scrollHeight
to fill due to IE 5 mac bug
! return parseInt(this.elm.scrollHeight);
}
else {
! this.elm.style.height = "auto";
! var h = this.elm.offsetHeight;
! this.elm.style.height = this.h;
! return h;
}
}
--- 366,377 ----
if (is.ns4) return this.doc.height;
else if (is.ie) {
! this.elm.offsetHeight;
! return parseInt(this.elm.scrollHeight);
}
else {
! this.elm.style.height = "auto";
! var h = this.elm.offsetHeight;
! this.elm.style.height = this.h;
! return h;
}
}
***************
*** 513,516 ****
else return [0,this.w,this.h,0];
}
! };
! DynLayer.prototype.invokeEvent=function() {};
\ No newline at end of file
--- 398,400 ----
else return [0,this.w,this.h,0];
}
! };
\ No newline at end of file
--- .jspack DELETED ---
--- dragevent.js DELETED ---
--- events.js DELETED ---
_______________________________________________
Dynapi-CVS mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-cvs