Jump to content
Search Community

born2net

Members
  • Posts

    15
  • Joined

  • Last visited

Everything posted by born2net

  1. As far as I know, there are no plans that I know of as ng2 provides its own internal syntax for animation. It uses triggers and supports both declarative and API style animation. I would love to see gsap be part of ng2, but no news on that AFAIK. regards
  2. Great, I have enough to work with... So just to double make sure, Kill is the only way to clean up after the Draggable is no longer needed?
  3. 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
  4. 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.
  5. LOL You can't be a Ninja of all things... but thanks, I got it, needed to do some cleanups and all good now. regards, Sean.
  6. I am wondering if someone can take a look at: https://plnkr.co/edit/D9nHs2knLDUGEzhs4h7i?p=preview it does not sort the items properly on drop. thanks for reading, Sean
  7. Hi Jack, just want to make sure you saw my last post TX Sean
  8. sorry my fault, I didn't explain well. what is supposed to happen is that when you select any of the components you should be able to re-sort the order. but it still not working on your plunkr either, regards, Sean.
  9. I have tried in my code 1.19.1 and same issue I believe (and could be wrong) that it is not working because I am using components instead of pure elements.
  10. Thanks for the quick reply. Yes, Chrome it is. Any chance you can fix in Plunkr so I can see how it works... TX again, FYI I am deeply involved in the ng2 comminity and plan on pushing gsap in ng2... to everyone! Angular 2 Kitchen sink: http://ng2.javascriptninja.io and source@ https://github.com/born2net/Angular-kitchen-sink Regards, Sean
  11. Hello, In GreenSock (gsap) and Angular2, Drag animation does not work with components. I created a Plunker: https://plnkr.co/edit/D9nHs2knLDUGEzhs4h7i?p=preview <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
  12. 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.
  13. 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: http://codepen.io/born2net/pen/brdDt 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.
×
×
  • Create New...