Update of /cvsroot/dynapi/dynapi/src/lib/dynapi/ext
In directory usw-pr-cvs1:/tmp/cvs-serv2167
Modified Files:
dragdrop.js
Log Message:
new dragdrop stuff
Index: dragdrop.js
===================================================================
RCS file: /cvsroot/dynapi/dynapi/src/lib/dynapi/ext/dragdrop.js,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** dragdrop.js 2001/03/30 08:56:43 1.5
--- dragdrop.js 2001/04/08 01:05:29 1.6
***************
*** 8,16 ****
dynapi.api.*
*/
! DynObject.prototype.DragDrop=function(s){
! if (!this.children.length>0) return;
! for (var i in this.children) {
! var ch=this.children[i];
! if (ch.x<s.x && ch.x+ch.w>s.x && ch.y<s.y && ch.y+ch.h>s.y)
ch.invokeEvent("drop");
}
! };
\ No newline at end of file
--- 8,26 ----
dynapi.api.*
*/
! DynObject.prototype.DragDrop=function(s){
! if (!this.children.length>0) return false;
! var ch,chX,sX,sY;
! for (var i in this.children) {
! ch=this.children[i];
! chX=ch.getPageX();
! chY=ch.getPageY();
! sX=s.getPageX();
! sY=s.getPageY();
! if (chX<sX && chX+ch.w>sX+s.w && chY<sY && chY+ch.h>sY+s.h) {
! if (ch.DragDrop(s)) return true;
! ch.invokeEvent("drop");
! return true;
! }
}
! return false;
! };
\ No newline at end of file
_______________________________________________
Dynapi-CVS mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-cvs