Jump to content
Search Community

born2net

Members
  • Posts

    15
  • Joined

  • Last visited

Posts posted by born2net

  1. ok I understand...

    Is kill supposed to be 100% removal?

    As the reason for this question is that even though I do a kill on all the draggables, I do see slowness that is happening while I scroll, as I create and destroy Draggable instance.

     

    This is how i clean up:

     

    this.m_draggables.forEach((drag) => {
       drag.kill()
    });

     

    and I do see the Draggable count going up in Chrome profiler :/

     

    Is there anything else I can do to clean up more? 

     

    Thanks,

     

    Sean

  2. I have a simple Draggable list

     

    ```

    var selector = '.sortableList';
    var sortable = document.querySelector(selector);
    self.m_draggables = Draggable.create(sortable.children, {

    ```

     

    full question also posted at:

    http://stackoverflow.com/questions/42444569/how-to-add-remove-children-in-a-gsap-draggable-list

     

    How do I add and remove children from the list, or better yet, how do I just append a brand new list to an existing instance of a Draggable? or, is it better to destroy rge Draggable and create a fresh one with the new set of children? and if so how?

     

    Thanks for reading,

     

    Sean.

  3. Hello,
     
    In GreenSock (gsap) and  Angular2, Drag animation does not work with components.
    I created a Plunker:
     
     
         <div style="width: 1000px">
                <alert-danger style="float: left; padding: 30px" class="drag" *ngFor="let c of [1,2,3,4]"></alert-danger>
            </div>
     
    and I wonder if its possible to have the Draggable work on components?
    It seems as if the selector is only selecting the 1st child,
     
    Thanks for reading,
     
    Regards,
     
    Sean

     

    See the Pen by edit (@edit) on CodePen

  4. that's perfect THANKS....

    another quick question, is there a destroy for Draggable.create(....

    in other words, I don't want to leak memory, and sometimes I would toss away the LI elements that were draggable, so do I need to do something to let GS know that I no longer need dragging on these elements since they have been removed from the DOM and no longer are used?

     

    TX,

     

    Sean.

  5. Hello,

    Love the drag and drop capabilities.

    I was wondering if anyone has an example of re-ordering.

    so if an item is dragged and dropped, other items will make room for it, moving away so the dropped item can be inserted into the dropped position? 

     

    The closest example I found is:

     

    I am basically looking to achieve this:

    http://css-tricks.com/draggable-elements-push-others-way/

     

    but with GS instead of jQuery UI.

     

    Thank you for reading,

     

    Sean.

    See the Pen brdDt by born2net (@born2net) on CodePen

×
×
  • Create New...