Share Posted September 25, 2015 Hello, The code : I'm working on project with draggable and works perfect, BUT i cant get one thing working. After you drag a div over a grid of divs the draggable div is append to the cell from the grid. This works fine. But when you drag the div for the second time, the div has to be 'de'-preppend (works) only its on the wrong position. I guess its the transform that needs to be reset. But what ever i try i cant get the result i want. There must be a simple sollution somehow, but after 2 hours of try and error i ask... Thanks for the great software and the support ! gr Mels See the Pen WQGqLB by hemels (@hemels) on CodePen Link to comment Share on other sites More sharing options...
Share Posted September 25, 2015 Hello hemels, and Welcome to the GreenSock Forum! I tried looking at your example but all i see is a grid with no element to drag. Link to comment Share on other sites More sharing options...
Share Posted September 25, 2015 not sure what the end result is supposed to be, but you might doing things out of order. And I wouldn't use top or left with a Draggable element that uses x and y. Here's a quick fix... See the Pen yYVLKm by osublake (@osublake) on CodePen And here's a drag and drop example that switches between containers... See the Pen waVYvz by osublake (@osublake) on CodePen Also, you might want to look through mine and Diaco's CodePen demos as we have a lot Draggable examples. http://codepen.io/osublake/public/ http://codepen.io/MAW/public/ 4 Link to comment Share on other sites More sharing options...
Share Posted September 25, 2015 Jonathan, are you on small monitor or do you use CodePen with the panels on top? It should be about one grid square below the entire grid. 1 Link to comment Share on other sites More sharing options...
Share Posted September 25, 2015 Yep that was it Blake.. I was to lazy to view on my desktop. I was viewing on my laptop in codepen, but panels were to the side. I had to hit F11 to go fullscreen then i saw the blue box. I forgot to switch my profile to compact. But Thanks Blake 1 Link to comment Share on other sites More sharing options...
Share Posted September 26, 2015 You moderators (ALL) are such fine coders but above all so very nice and helpful folks. What a great experience it is visiting this forum (almost every day)! 2 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now