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

Modified Files:
        dragevent.js 
Log Message:
Fixed NS6 events. Click and double click events are no
longer generated after drag. Includes a fix for NS4 not firing a click when
a dragable layer is clicked on.

Index: dragevent.js
===================================================================
RCS file: /cvsroot/dynapi/dynapi/src/lib/dynapi/api/dragevent.js,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** dragevent.js        2001/02/09 15:32:10     1.7
--- dragevent.js        2001/03/14 18:00:48     1.8
***************
*** 2,8 ****
     DynAPI Distribution
     DragEvent Class
!   
     The DynAPI Distribution is distributed under the terms of the GNU LGPL license.
! */ 
  function DragEvent(type,src) {
        this.type=type;
--- 2,8 ----
     DynAPI Distribution
     DragEvent Class
! 
     The DynAPI Distribution is distributed under the terms of the GNU LGPL license.
! */
  function DragEvent(type,src) {
        this.type=type;
***************
*** 25,29 ****
  DragEvent.lyrListener=new EventListener();
  DragEvent.lyrListener.onmousedown=function(e) {
!       e.cancelBrowserEvent();
        if (DynAPI.document.dragevent) return;
        var lyr=e.getSource();
--- 25,30 ----
  DragEvent.lyrListener=new EventListener();
  DragEvent.lyrListener.onmousedown=function(e) {
!       if (is.ns6 && e.orig.target.tagName=="INPUT") return;
!       if (!is.ns)e.cancelBrowserEvent();
        if (DynAPI.document.dragevent) return;
        var lyr=e.getSource();
***************
*** 46,50 ****
        var de = DynAPI.document.dragevent;
        if (!de) return;
!       if (!de.isDragging && ((Math.abs(de.pageX-e.getPageX())-DragEvent.dragPlay>0) 
||      
        (Math.abs(de.pageY-e.getPageY())-DragEvent.dragPlay>0)) ) {
                de.isDragging=true;
--- 47,51 ----
        var de = DynAPI.document.dragevent;
        if (!de) return;
!       if (!de.isDragging && ((Math.abs(de.pageX-e.getPageX())-DragEvent.dragPlay>0) 
||
        (Math.abs(de.pageY-e.getPageY())-DragEvent.dragPlay>0)) ) {
                de.isDragging=true;
***************
*** 105,109 ****
        if (lyr.parent.DragDrop) lyr.parent.DragDrop(lyr);
        de.type="dragend";
!       if (is.ie) DynAPI.wasDragging=true;
        de.isDragging=false;
        lyr.invokeEvent("dragend",de);
--- 106,110 ----
        if (lyr.parent.DragDrop) lyr.parent.DragDrop(lyr);
        de.type="dragend";
!       if (is.def) DynAPI.wasDragging=true;
        de.isDragging=false;
        lyr.invokeEvent("dragend",de);


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

Reply via email to