Update of /cvsroot/dynapi/dynapi/tests
In directory usw-pr-cvs1:/tmp/cvs-serv24860

Modified Files:
        drag_forms.html 
Log Message:
added Martin Strom's fix for forms in draggable layers, and removed testcode from 
example


Index: drag_forms.html
===================================================================
RCS file: /cvsroot/dynapi/dynapi/tests/drag_forms.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** drag_forms.html     2001/11/12 17:49:27     1.2
--- drag_forms.html     2001/11/14 13:27:38     1.3
***************
*** 18,49 ****
  <!--
  
- // owerride old one to test
- DragEvent.lyrListener.onmousedown=function(e) {
-       if (is.def) {
-               var tn = is.ie? e.orig.srcElement.tagName : e.orig.target.tagName;
-               if (tn=="INPUT" || tn=="TEXTAREA") return;              
-       }
-       
-       e.cancelBrowserEvent();
-       if (DragEvent.dragevent.src) return;
-       
-       var lyr=e.getSource();
-       if (is.ie) lyr.doc.body.onselectstart = function() { return false; }
- 
-       // Initialize dragEvent object
-       var de=DragEvent.dragevent;
-       de.type="dragstart"
-       de.src=lyr
- 
-       // Set properties
-       de.isDragging=false;
-       de.x=e.getPageX()-e.getSource().getPageX();
-       de.y=e.getPageY()-e.getSource().getPageY();
-       de.pageX=e.getPageX();
-       de.pageY=e.getPageY();
-       de.parentPageX=lyr.parent.getPageX();
-       de.parentPageY=lyr.parent.getPageY();
- };
- 
  DynAPI.onLoad=function() {
        lyr = new DynLayer(null,50,50,250,200,'red');
--- 18,21 ----
***************
*** 54,78 ****
                                '<br><img 
src="../src/lib/dynapi/images/common/arrowdown.gif" width=50 height=50></form>');
  
-       listener = new EventListener();
-       listener.ondragend=function(e) {
-       
-               // will be moved to dragevent.js when tested and done
-               //var html = e.getSource().getHTML().toLowerCase();
-               
-               //if (html.indexOf("<form")>-1 || (is.ns4 && html=="")) { 
-                       if (is.ie && is.platform=="mac") {
-                               document.body.className = document.body.className;
-                       }
-                       else if (is.ns4 && is.platform=="win32") {
-                               document.bgColor = document.bgColor;
-                       }
-               //}
-       }
-       lyr.addEventListener(listener);
-       
        DynAPI.document.addChild(lyr);
  
        DragEvent.enableDragEvents(lyr);
!       DragEvent.setDragBoundary(lyr); 
  };
  
--- 26,33 ----
                                '<br><img 
src="../src/lib/dynapi/images/common/arrowdown.gif" width=50 height=50></form>');
  
        DynAPI.document.addChild(lyr);
  
        DragEvent.enableDragEvents(lyr);
!       DragEvent.setDragBoundary(lyr);
  };
  


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

Reply via email to