1. #1
    Ext User Johnny Bozzetto's Avatar
    Join Date
    Apr 2010
    Posts
    10
    Vote Rating
    0
    Johnny Bozzetto is on a distinguished road

      0  

    Default Drag multiple <div> Elements

    Drag multiple <div> Elements


    Hi,

    I wanted to ask if there was something in Ext that could provide a similar functionality:
    (this Example is taken from Jquery: you can also select multiple <div>s by drawing a rectangle)
    http://www.ryancoughlin.com/demos/dragselect/index.html

    I also read a discussion in which Animal suggested to use DDView:
    http://www.sencha.com/forum/showthre...abled-Ext.View

    But I was looking for something easier to use, that could also provide me the "selection Rectangle".

    Is there anything similar in Ext? Is there any DnD class that can do it?

    Thanks

  2. #2
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,503
    Vote Rating
    50
    Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    A DDView drags selected nodes IIRC

    And there's a clicky-draggy selection plugin in the examples UX folder.

    So there's some stuff for you to work with.

  3. #3
    Ext User Johnny Bozzetto's Avatar
    Join Date
    Apr 2010
    Posts
    10
    Vote Rating
    0
    Johnny Bozzetto is on a distinguished road

      0  

    Default


    Is there any simple example that explains how to use DDView?

  4. #4
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,503
    Vote Rating
    50
    Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    The MultiSelect example does it.

  5. #5
    Ext User Johnny Bozzetto's Avatar
    Join Date
    Apr 2010
    Posts
    10
    Vote Rating
    0
    Johnny Bozzetto is on a distinguished road

      0  

    Default


    Quote Originally Posted by Animal View Post
    The MultiSelect example does it.
    Can I ask you where it is? I can't find it.

    Anyway, I still can't get if DDView is like a DataView that needs a store.. In that case , wouldn't that be too much complex to move just a couple of divs?

  6. #6
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,503
    Vote Rating
    50
    Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    Moving divs is an easy trick.

    It's the application meaning, and the data that is being carried, and passed into some object that is important.

    What are wanting? A trick which moves coloured divs on the screen, or an app which delivers a payload of objects to another object?

  7. #7
    Ext User Johnny Bozzetto's Avatar
    Join Date
    Apr 2010
    Posts
    10
    Vote Rating
    0
    Johnny Bozzetto is on a distinguished road

      0  

    Default


    I think something like "A trick which moves coloured divs on the screen"

    I just need something exactly like this:
    http://www.ryancoughlin.com/demos/dragselect/index.html
    And nothing more. I need the user to move divs inside another div, and maybe select more than one div with a rectangle and move them together. .
    No payload needed.

    Can this be done easily with Extjs?

  8. #8
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,503
    Vote Rating
    50
    Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    Then it's simple. Just use the Ext.dd classes to move some divs around.

  9. #9
    Ext User Johnny Bozzetto's Avatar
    Join Date
    Apr 2010
    Posts
    10
    Vote Rating
    0
    Johnny Bozzetto is on a distinguished road

      0  

    Default


    I've tried with Ext.dd.DD but I couldn't get how to select and move them "together"... I can just move one <div> at a time...

    Any advice?

  10. #10
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,503
    Vote Rating
    50
    Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    Create an instance for all elements you want to move.

Similar Threads

  1. Drag&Drop multiple elements
    By Alex84 in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 29 Oct 2009, 8:12 AM
  2. Hidden DIV elements in desktop example
    By deepakjacob in forum Ext 3.x: Help & Discussion
    Replies: 0
    Last Post: 21 Jul 2009, 6:53 AM
  3. Masking of div elements not working in IE
    By balaji.krish in forum Ext 2.x: Help & Discussion
    Replies: 4
    Last Post: 24 May 2009, 10:28 PM
  4. Newbie question: select all elements in one div
    By Brian_himself in forum Ext 1.x: Help & Discussion
    Replies: 5
    Last Post: 7 Nov 2007, 4:54 AM
  5. Form not getting submitted containing elements in div
    By kaps77 in forum Ext 1.x: Help & Discussion
    Replies: 18
    Last Post: 6 Jan 2007, 11:36 PM

Thread Participants: 2

Tags for this Thread