Results 1 to 5 of 5

Thread: Moving Multiple divs at a time

  1. #1
    Join Date
    Jul 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Moving Multiple divs at a time

    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)
    Regards,
    Suleman

  2. #2
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Heres a drag and drops that follow some of your requirements.
    http://www.walterzorn.com/dragdrop/dragdrop_e.htm
    Jeremy | jfein.net

  3. #3
    Join Date
    Jul 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default drag drop multiple divs

    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
    Regards,
    Suleman

  4. #4
    Join Date
    Jul 2006
    Posts
    497
    Thanks
    8
    Thanked 70 Times in 70 Posts

    Default

    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...

  5. #5
    Join Date
    Sep 2005
    Location
    India
    Posts
    1,627
    Thanks
    6
    Thanked 107 Times in 107 Posts

    Default

    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)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •