Open GoogleCodeExporter opened 8 years ago
For your first problem :
You have to listen on the dragEvent on the draggable element...
So you can easily simulate what you call "move over droppable event" by
implementing something like this :
public class MyHandler implements OverDroppableEventHandler,
OutDroppableEventHandler, DragEventHandler{
private HandlerRegistration dragHandlerRegistration;
public void onOutDroppable(OutDroppableEvent event) {
dragHandlerRegistration.removeHandler();
}
public void onOverDroppable(OverDroppableEvent event) {
DraggableWidget<?> draggable = event.getDraggableWidget();
// listen drag event when draggable is over the droppable
dragHandlerRegistration = draggable.addDragHandler(this);
}
public void onDrag(DragEvent event) {
// method call when the draggable is moving over the droppable
}
}
//on your droppable Widget :
DroppableWidget<Widget> droppable = ...
MyHandler droppableHandler = new MyHandler();
droppable.addOutDroppableHandler(droppableHandler);
droppable.addOverDroppableHandler(droppableHandler);
Concerning the problem with the removal of the draggable element. Just tell to
the draggable plugin to use a clone of the element for the drag operation by
using the useCloneAsHelper() method :
dragableWidget.useCloneAsHelper();
Let's me know if the proposed solutions meet your requirements.
Original comment by julien.d...@gmail.com
on 19 Aug 2011 at 4:32
Any update regarding my comment ?
Original comment by julien.d...@gmail.com
on 24 Oct 2011 at 9:25
Original issue reported on code.google.com by
julien.d...@gmail.com
on 19 Aug 2011 at 4:12