Update of /cvsroot/dynapi/dynapi/src/lib/dynapi/api
In directory usw-pr-cvs1:/tmp/cvs-serv10312/src/lib/dynapi/api
Modified Files:
events.js dynlayer.js dragevent.js
Log Message:
Small changes for next release.
Index: events.js
===================================================================
RCS file: /cvsroot/dynapi/dynapi/src/lib/dynapi/api/events.js,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -r1.15 -r1.16
*** events.js 2001/01/20 21:42:23 1.15
--- events.js 2001/01/25 21:13:35 1.16
***************
*** 126,131 ****
DynLayer.prototype.invokeEvent=function(type,e) {
if (!this.hasEventListeners) return;
-
- /* Fix by Ilmaestro: more accurate event Bubbling criteria */
if (is.ie && type=='mouseover' && this.elm.contains(e.orig.fromElement))
return;
if (is.ie && type=='mouseout' && this.elm.contains(e.orig.toElement)) return;
--- 126,129 ----
Index: dynlayer.js
===================================================================
RCS file: /cvsroot/dynapi/dynapi/src/lib/dynapi/api/dynlayer.js,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -r1.17 -r1.18
*** dynlayer.js 2001/01/21 20:35:46 1.17
--- dynlayer.js 2001/01/25 21:13:35 1.18
***************
*** 25,30 ****
this.html=null;
this.bgImage=null;
!
! // these stay null until created - checks for this.created have been replace
with this.elm!=null
this.elm=null;
this.doc=null;
--- 25,29 ----
this.html=null;
this.bgImage=null;
!
this.elm=null;
this.doc=null;
***************
*** 273,278 ****
else if (dlyr.w!=null && dlyr.h!=null);
s+=' clip="0,0,'+dlyr.w+','+dlyr.h+'"';
! // not working. See assignChildren()
! // if (dlyr.z) s+=' z-Index='+dlyr.z;
if (dlyr.bgImage!=null) s+=' background="'+dlyr.bgImage+'"';
if (dlyr.bgColor!=null) s+=' bgcolor="'+dlyr.bgColor+'"';
--- 272,276 ----
else if (dlyr.w!=null && dlyr.h!=null);
s+=' clip="0,0,'+dlyr.w+','+dlyr.h+'"';
!
if (dlyr.bgImage!=null) s+=' background="'+dlyr.bgImage+'"';
if (dlyr.bgColor!=null) s+=' bgcolor="'+dlyr.bgColor+'"';
***************
*** 294,302 ****
else if (dlyr.w!=null && dlyr.h!=null);
s+=' clip:rect(0px '+dlyr.w+'px '+dlyr.h+'px 0px);';
! // not working. See assignChildren()
! //if (dlyr.z) s+=' zindex='+dlyr.z;
! if (dlyr.bgImage!=null) s+=' background-image:url('+dlyr.bgImage+');'
// DCP : This works :)
if (dlyr.bgColor!=null) s+=' background:'+dlyr.bgColor+';'
! if (is.ie55 && dlyr.bgImage==null && dlyr.html==null) s+='
background-image:url(javascript:null);' // DCP : Fixes IE5.5 specific event problem
s+=' position:absolute;">';
if (dlyr.html!=null) s+=dlyr.html;
--- 292,298 ----
else if (dlyr.w!=null && dlyr.h!=null);
s+=' clip:rect(0px '+dlyr.w+'px '+dlyr.h+'px 0px);';
! if (dlyr.bgImage!=null) s+=' background-image:url('+dlyr.bgImage+');'
if (dlyr.bgColor!=null) s+=' background:'+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;
***************
*** 433,440 ****
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;
}
if (noevt!=false) this.invokeEvent("load");
};
--- 429,434 ----
this.elm.appendChild(df);
for (var i in this.doc.images) this.doc.images[i].lyrobj=this.elm;
}
+ else { }
if (noevt!=false) this.invokeEvent("load");
};
***************
*** 478,485 ****
};
DynLayer.prototype.getContentWidth=function() {
! return this.elm==null? 0 : (is.ns4? this.doc.width :
parseInt(this.elm.scrollWidth));
};
DynLayer.prototype.getContentHeight=function() {
! return this.elm==null? 0 : (is.ns4? this.doc.height :
parseInt(this.elm.scrollHeight));
};
DynLayer.prototype.setClip=function(clip) {
--- 472,487 ----
};
DynLayer.prototype.getContentWidth=function() {
! if (this.elm==null) return 0;
! else if (is.ns4) return this.doc.width;
! else if (is.ns5) return this.elm.offsetWidth;
! 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) return this.elm.offsetHeight;
! else if (is.ie) return parseInt(this.elm.scrollHeight);
! else return 0;
};
DynLayer.prototype.setClip=function(clip) {
***************
*** 506,508 ****
}
};
! DynLayer.prototype.invokeEvent=function() {};
--- 508,510 ----
}
};
! DynLayer.prototype.invokeEvent=function() {};
\ No newline at end of file
Index: dragevent.js
===================================================================
RCS file: /cvsroot/dynapi/dynapi/src/lib/dynapi/api/dragevent.js,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** dragevent.js 2001/01/20 21:44:14 1.5
--- dragevent.js 2001/01/25 21:13:35 1.6
***************
*** 28,31 ****
--- 28,32 ----
if (DynAPI.document.dragevent) return;
var lyr=e.getSource();
+ if (is.ie) lyr.doc.body.onselectstart = function() { return false; }
lyr.dragevent=new DragEvent("dragstart",lyr);
DynAPI.document.dragevent=lyr.dragevent;
***************
*** 92,104 ****
if (!de) return;
if (!de.isDragging) {
! de.type="dragend";
! de.src=null;
! e.setBubble(true);
! DynAPI.document.dragevent=null;
! DynAPI.document.dragobject=null;
return;
}
var lyr=de.src;
if (!lyr) return;
if (lyr.parent.DragDrop) lyr.parent.DragDrop(lyr);
de.type="dragend";
--- 93,106 ----
if (!de) return;
if (!de.isDragging) {
! de.type="dragend";
! de.src=null;
! e.setBubble(true);
! DynAPI.document.dragevent=null;
! DynAPI.document.dragobject=null;
return;
}
var lyr=de.src;
if (!lyr) return;
+ if (is.ie) lyr.doc.body.onselectstart = null;
if (lyr.parent.DragDrop) lyr.parent.DragDrop(lyr);
de.type="dragend";
***************
*** 119,125 ****
var dlyr = arguments[0];
if (dlyr.constructor!=DynDocument);
! dlyr.addEventListener(DragEvent.lyrListener); // getComponent().
for (var i=1;i<arguments.length;i++) {
! var lyr=arguments[i]; //.getComponent()
lyr.addEventListener(DragEvent.lyrListener);
}
--- 121,127 ----
var dlyr = arguments[0];
if (dlyr.constructor!=DynDocument);
! dlyr.addEventListener(DragEvent.lyrListener);
for (var i=1;i<arguments.length;i++) {
! var lyr=arguments[i];
lyr.addEventListener(DragEvent.lyrListener);
}
***************
*** 129,133 ****
DragEvent.disableDragEvents=function() {
for (var i=0;i<arguments.length;i++) {
! var lyr=arguments[i]; //.getComponent()
lyr.removeEventListener(DragEvent.lyrListener);
}
--- 131,135 ----
DragEvent.disableDragEvents=function() {
for (var i=0;i<arguments.length;i++) {
! var lyr=arguments[i];
lyr.removeEventListener(DragEvent.lyrListener);
}
_______________________________________________
Dynapi-CVS mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-cvs