View Full Version : Moving Multiple divs at a time

07-16-2008, 01:18 PM
Hello to all,
I am working on a project i which i can drag and drop the elements on a canvas(drawing area) and resize them just like a drawing program. The elements which put on the canvas are divs. I can place a single div on the canvas, change its position with mouse and resize it it with mouse. I can place multiple objects on the canvas but when I move the element then i can only one element move at time. I want to make it that I select the different elements (by using shift+click or ctrl+click)and then move them on the canvas. In fact I implement the multiple selection as well but when I move the these selected elements then all elements comes on single location and then move. I want that these elements should remain on their propspective location. Just like in visual studio we draw the buttons on the form and then select these buttons and when we move all buttons move but their respection location.
Can any one help me (javascript and HTML)

07-16-2008, 01:40 PM
Heres a drag and drops that follow some of your requirements.

07-17-2008, 10:30 AM
Hello Nile,
First I thank you for giving the attention for my problem. But my problem still there. The link you refered I already checked and use but it have problem that it does not support the multiple selection. I m able to drag, drop, move and resize a single div but I want to perform these operatios with multiple divs at a time. Moving multiple objects by selecting them at a time and I think this problem not belongs to javascript. It belongs to logic

07-17-2008, 03:16 PM
Can you give the URL of a demonstration of where you are? It sounds like tweaking that script to select multiple elements with Ctrl-click should be fairly easy...

07-18-2008, 03:24 AM
Using the script found at http://www.walterzorn.com/dragdrop/dragdrop_e.htm you can drag and drop multiple elements. Please have a look their APIs (have a look at addChild(), attachChild() functions)