born2net
Members-
Posts
15 -
Joined
-
Last visited
born2net's Achievements
0
Reputation
-
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
-
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
-
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.
-
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.
-
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
-
TX!!!! You were right, regards Sean
-
Hi Jack, just want to make sure you saw my last post TX Sean
-
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.
-
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.
-
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
-
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
-
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.
-
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.