-->
Make your own free website on Tripod.com
1.Click inside the rectangle to start the demo
2.Click again to stop it


Make love, not war

Disabling the moving handler makes sense when you need only the transformed positions of the nodes inside a container. If you specify disableHandler as true, there will be no action when the user tries to drag a node. However, there is a purpose behind this. The newly created MoveContainer offers you a method to access the nodes (which now are absolute positioned) and you can move them based on your algorithm.

There is a basic demo in this page that will make you understand what I am talking about. Combined with the restore() method of the MoveContainer it offers you the possibility to generate some movement and then restore everything to the initial state

The getElements() function will return you the array of the MoveElement objects. Each of these objects contains a reference to the element moved (in the .id member). So iterating through the array and modifying its content will result in afecting the elements inside the container

Disabling the moving handler

Step 1.Include the javascript file:
<script src="moving2.js"></script>
Step 2: Call the moving function:
<script>
function move(c) {
MoveContainer(c, false, true);
}
</script>
Getting the list of elements

Step 1. Include the javascript file
Step 2. Call the moving function
Step 3. Get the list
<script>
function getList(c) {
var wC=c.__wrapperContainer;
if(wC)
return wC().getElements();
else return null;
}
</script>