Jump to content


  • Posts

  • Joined

  • Last visited

Recent Profile Visitors

1,079 profile views

jceddy's Achievements


Newbie (1/14)



  1. The issue with calling endDrag() is that it triggers the onDragEnd handler, which does other processing I want to avoid in this case. I suppose I could add something to the event object to let the handler know that I ended it due to my checks (as opposed to it being ended by the user letting up on the mouse button). Edit: That's what I ended up doing. There are a couple situations that just adding some info to the event object being propagated helped me solve.
  2. I actually moved the check to onPress and just basically just disable then re-enable the Draggable if the check fails.
  3. I have some code that checks conditions in the onDragStart handler. I'd like to be able to cancel the drag if a set of conditions are not met. I had assumed that returning false from handler would do it, but was wrong. Is there any clean way to cancel a drag in this case?
  4. Thanks guys, this helped me out immensely. I ended up going with OSUblack's method, so marked his as the answer. Would mark you both if I could.
  5. I'm interested in creating a draggable div that can be translated or rotated depending on some criteria, for example: rotate if CTRL is pressed, translate otherwise...or, translate if the mouse is clicked near the center of the object, rotate if the mouse is clicked near the edge of the object. The method I've tested involves detecting the CTRL key up/down events and killing the existing translate/rotation draggable and creating the other one. This works except that after an object that has been rotated, then translating it causes additional rotation. Any suggestions?