Dragging Large Child Layers : Draggable Layer : Ajax Layer JAVASCRIPT DHTML TUTORIALS


JAVASCRIPT DHTML TUTORIALS » Ajax Layer » Draggable Layer »

 

Dragging Large Child Layers




http://dynapi.sourceforge.net/
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
<html>
<head>
<title>Dragging Large Child Layers</title>
<script language="JavaScript" src="./dynapisrc/dynapi.js"></script>
<script language="Javascript">
dynapi.library.setPath('./dynapisrc/');
dynapi.library.include('dynapi.api');
dynapi.library.include('DragEvent');
</script>
<script language="Javascript">

var container = new DynLayer(null,0,0,200,200,"e0e0e0");
var insideObj = new DynLayer("Can drag until x & y=0. This due to boundrary  {left:0, right:0, top:0, bottom:0} and this layer being larger than it's parent",100,100,400,400"lime")// larger than our container...
container.addChild(insideObj);

DragEvent.setDragBoundary(insideObj, {left:0, right:0, top:0, bottom:0});
DragEvent.enableDragEvents(insideObj);

dynapi.document.addChild(container);

var container = new DynLayer(null,250,0,200,200,"e0e0e0");
var insideObj = new DynLayer("Can't drag due to boundrary  {left:0, right:0, top:0, bottom:0} and this layer being larger than it's parent",0,0,400,400"yellow")// larger than our container...
container.addChild(insideObj);

DragEvent.setDragBoundary(insideObj, {left:0, right:0, top:0, bottom:0});
DragEvent.enableDragEvents(insideObj);

dynapi.document.addChild(container);

</script>
</head>
<body>
<script>
  dynapi.document.insertAllChildren();
</script>
</body>
</html>

           
       

Download : Download nav_dynapi.zip nav_dynapi.zip


-

Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

JAVASCRIPT DHTML TUTORIALS

 Navioo Ajax Layer
» Draggable Layer