Saturday, August 28, 2010

Widget drag sometimes doesn't work

I'm building app where user is able to create Rectangle, Circle and
what-not nodes and connect them with links using gwt-graphics library.
Now, drag event is crucial as user must be able to move created nodes.
Sometimes when I just do mouse down (without prior clicking) drag
works just fine. After that (when node is focused), when I try to move
node, cursor turns into crossed circle icon (drag disabled icon) and
no event is fired AT ALL. :(

Node object handles select/deselect events, while canvas object below
them is actually handling mouseMove and moves selected nodes.
Basically, both canvas and nodes have this piece of code:
----
addClickHandler(eventHandler);
addMouseDownHandler(eventHandler);
addMouseUpHandler(eventHandler);
addMouseMoveHandler(eventHandler);
addMouseOverHandler(eventHandler);
addMouseOutHandler(eventHandler);
addDoubleClickHandler(eventHandler);
----
where eventHandle is my instance of object that implements all those
event handlers.

Did others stumble upon this problem? Are focused widgets not
draggable?

Any help would be much appreciated.

Thanks,
Jovan

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment