Given the following page:
http://spatial.ci.stpaul.mn.us/dynapi/spatialHTML/drag3.html
I know it's pretty simple, but I'm trying to building it up     ;-)

Drag the image around some and notice the drag boundary. How can I maintain this same drag boundary after resizing the window. Is there a way to do something like "onLoad or/and onResize"?

Thanks  bobb

Here is the code:

(please let me know if there are ways to lighten this code up)
 

     <Script language="Javascript" src="../src/dynapi.js"></script>

     <Script language="Javascript">

DynAPI.setLibraryPath('../src/lib/');

DynAPI.include('dynapi.api.*');
DynAPI.include('dynapi.util.thread.js');
DynAPI.include('dynapi.util.pathanim.js');
DynAPI.include('dynapi.ccreationExt.layerpos.js');

     DynAPI. {

             addLay=new DynLayer(null,null,null,1200,1195,'#c0c0c0');
 
             addLay.setHTML('<img src="http://spatial.ci.stpaul.mn.us/dynapi/docs/FME_a002871138414988.png">');
 
             DragEvent.setDragBoundary(addLay,-(1195-this.document.getHeight()+20),(1200-this.document.getWidth()+this.document.getWidth()+20),(1195-this.document.getHeight()+this.document.getHeight()+20),-(1200-this.document.getWidth()+20));

             DragEvent.enableDragEvents(addLay);
 
             DynAPI.document.addChild(addLay);
 
             addLay.positionInParent('middlecenter');
     }

     </script>

Reply via email to