Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...

luke_nukem_3d

Members
  • Posts

    4
  • Joined

  • Last visited

luke_nukem_3d's Achievements

Newbie

Newbie (1/14)

1

Reputation

  1. Hi there, I am trying to figure out a way to write automated tests for my drag and drop implemented with the Draggable library. A couple of questions really. Is this using native events under the hood? Are there any solutions or examples of people writing tests that work for draggables? Are there any helpers provided from the libraries that might aid me in this? Thanks, Luke
  2. Brilliant that looks perfect, thanks so much for your help, will try and implement this in my scenario. Can i just say, really appreciate the quick help you guys offer. Absolutely brilliant.
  3. Hi Carl, thanks for your quick reply. The demo is rather a simplified version of the actual problem (which does not involve the behaviour with the hovering triggering the expansion), it was just a way of recreating my actual problem in a very simplistic fashion. My actual use case, does use the hitTest() method to determine whether the container should expand or not, and that part of it works very smoothly. Its just that if that container expands by a large amount then your draggable object is suddenly nowhere near your mouse pointer. Due to the way that my data is bound to the DOM elements, its not really possible to position the Draggable object absolutely, although I can see that would be a possible solution. Apologies for the over simplified Code Pen as I think it caused some confusion.
  4. Hi there, I'm having what I would have thought to be a common problem, but can't find a neat solution to it. I have created a simple recreation of it in the code pen below. Try dragging the blue draggable into the grey square, and when you are over the grey square allow the mouse to come outside the draggable slightly which will let the grey box expand. When the box expands the draggable is now far behind the pointer (probably the distance the box has expanded). I want to get the draggable to catch up with the mouse pointer. Have tried tweening by a calculated distance in the 'onDrag' hook, but this seems to cause it to keep jumping back and forth. Thanks in advance for any help anyone can give me, really appreciated.
×