开发者

How can I make gwt-dnd allow scrolling while dragging?

开发者 https://www.devze.com 2023-03-17 17:26 出处:网络
I have an application that uses gwt-dnd to make boxes draggable, but when there are too many boxes it 开发者_Go百科is difficult for the user to drag them to reorganise them.Currently they have to drag

I have an application that uses gwt-dnd to make boxes draggable, but when there are too many boxes it 开发者_Go百科is difficult for the user to drag them to reorganise them. Currently they have to drag by a few places at a time and then manually scroll up and repeat, whereas what I'd like is for them to be able to drag the item to the edge of the display and scroll up (or down) further.

The testcase I created on github shows the best I've managed so far, in minimal form (one small .java file, one small .html and one small .css) whereby the user has to drag to the edge and then each time they wiggle the mouse a bit it scrolls a little more.

You can build and run that testcase by doing mvn clean install jetty:run-war

Any suggestions for improving how this works?


I don't know if it is possible with gwt-dnd. Have a look at the dnd plugins of gwtquery, it supports natively the automatics scrolling of the page: http://code.google.com/p/gwtquery-plugins/wiki/DragAndDropPluginForGWTDeveloppers check at the examples.

0

精彩评论

暂无评论...
验证码 换一张
取 消