Update of /cvsroot/dynapi/dynapi/src/lib/dynapi/ext
In directory usw-pr-cvs1:/tmp/cvs-serv18745/src/lib/dynapi/ext

Modified Files:
        dragdrop.js 
Log Message:
Scott Severtson's dragdrop fix

Index: dragdrop.js
===================================================================
RCS file: /cvsroot/dynapi/dynapi/src/lib/dynapi/ext/dragdrop.js,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** dragdrop.js 2001/04/08 01:05:29     1.6
--- dragdrop.js 2001/08/14 21:32:30     1.7
***************
*** 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
--- 8,28 ----
        dynapi.api.*
  */ 
! DynObject.prototype.DragDrop=function(s,e){
        if (!this.children.length>0) return false;
!       var ch,chX,chY,eX,eY;
!       eX = e.getX();
!       eY = e.getY();
!       for (var i in this.children) {
!               ch=this.children[i];
!               if(ch!=s) {
!                       chX=ch.getPageX();
!                       chY=ch.getPageY();
!                       if (chX<eX && chX+ch.w>eX && chY<eY && chY+ch.h>eY)  {
!                               if (ch.DragDrop(s,e)) return true;
!                               ch.invokeEvent("drop");
!                               return true;
!                       }
                }
        }
!       return false;
! };


_______________________________________________
Dynapi-CVS mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-cvs

Reply via email to