const BOTTOMBORDER=100; const RIGHTBORDER=300; const LEFTBORDER=50; const TOPBORDER=50; document.maxX=0; document.maxY=0; dragNDrop.addSubscriber(notifyObjectMove,"endMoving"); function notifyObjectMove(publisher,eventType,addInfo){ if (("endMoving"==eventType) && (addInfo != null)){ var posX=parseInt(addInfo.style.left.split("px")[0]); var posY=parseInt(addInfo.style.top.split("px")[0]); if (posYdocument.maxX) || ((posY+BOTTOMBORDER)>document.maxY)) { document.maxX=posX+RIGHTBORDER; document.maxY=posY+BOTTOMBORDER; resizeWorkspace(); } } } function moveAllNodes(axis,pixels){ var allNodes=document.getElementById("nodes").childNodes; for (var i=0;i