What am I building?


A custom spreadsheet where users can pickup an "item" from a cell and drag it to another. The draggable objects are constrained to only move horizontally. I couldn't find a way to do this with the DragSource and DropTarget so I have created a ConstrainedDragSource and ConstrainedDropTarget. It's basically a copy-paste from the original sources from DragSource/DropTarget except that the constructor DragSource looks now like this:

Code:
  draggable = new DraggableWithMovedProxy(widget, 0, 20);
  draggable.setUseProxy(true);
  draggable.setMoveAfterProxyDrag(false);
  draggable.setConstrainVertical(true);
  draggable.setXConstraint(xStart, xEnd);
  draggable.addDragHandler(handler);
Instead of


Code:
  
  draggable = new Draggable(widget);
  draggable.setUseProxy(true);
  draggable.setSizeProxyToSource(false);
  draggable.setMoveAfterProxyDrag(false);
  draggable.addDragHandler(handler);
  draggable.setProxy(statusProxy.getElement());


Notice i've added setXConstraint to the draggable.


The proxy of the DragSource is the same size as the cell. Now the problem lies in that when I drag the proxy above another DropTarget it doesn't turn on the "feedback". I have debugged the code and the problem is that DNDManager.handleDragMove (in my codebase I've copied this class aswell as ConstrainedDndManager):


ConstrainedDropTarget target = getTarget(source, (Element) event.getDragMoveEvent().getNativeEvent().getEventTarget().cast());


returns null upon calling. When I ease the contrain range (y) it's possible to drag the proxy abit down and move the mouse upon the DropTarget. The feedback shows and it's possible to drag it into the cell.


What do I want? To keep the horizontal move range (and not making it possible to move it vertically) and allow the feedback to work when dragging a cell proxy upon another cell.