DnD lag in DropControllerCollection

26 views
Skip to first unread message

Rhystic

unread,
Jan 2, 2012, 10:13:59 AM1/2/12
to gwt...@googlegroups.com
Hi Fred,

I just came across dnd in my GWT project and tried to use this awesome library in my project. However I've encounter a problem with a very noticeable lag in the drag-drop flow when I'm using DropControllerCollection with multiple DropController on SimplePanel.

I copied the entired class out and try to figure out which part of the code was causing the lag and I found that it was the resetCache method that causing the lag.

Now I'm somewhat stuck in the middle and hope anyone that has encountered this problem before could share some opinion on how to solve this problem :)

Thanks a bunch!

Frederick van Staden

unread,
Jan 4, 2012, 2:21:16 AM1/4/12
to gwt...@googlegroups.com
This could be a silly remark but, when you are in gwt development mode, EVERYTHING is extremely slow.
Try compiling and running your app in hosted mode.

=)

--
You received this message because you are subscribed to the Google Groups "gwt-dnd" group.
To view this discussion on the web visit https://groups.google.com/d/msg/gwt-dnd/-/PvjuPjrPmesJ.
To post to this group, send email to gwt...@googlegroups.com.
To unsubscribe from this group, send email to gwt-dnd+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gwt-dnd?hl=en.

Rhystic

unread,
Jan 5, 2012, 10:27:35 PM1/5/12
to gwt...@googlegroups.com
Ahhh!!

Silly me, yeah the app run smoothly in hosted mode x_x omg! Was getting heart attack wondering why the app is so laggy in dev mode and used whole day trying to debug x(

Thanks!

Frederick van Staden

unread,
Jan 6, 2012, 2:49:37 AM1/6/12
to gwt...@googlegroups.com
LOL!Happened to us all!

No problems!

--
You received this message because you are subscribed to the Google Groups "gwt-dnd" group.
To view this discussion on the web visit https://groups.google.com/d/msg/gwt-dnd/-/E37z05TBcF0J.

Rhystic

unread,
Jan 9, 2012, 11:36:39 AM1/9/12
to gwt...@googlegroups.com
Hi,

I faced another problem regarding the PickupDragController:

PickupDragController bodyDragController = new PickupDragController(bodySelectionPane,false);
bodyDragController.setBehaviorMultipleSelection(false); 
bodyDragController.setBehaviorDragStartSensitivity(1);

Image test = new Image(GWT.getModuleBaseURL()+"images/NoImg.jpg");
PushButton test2 = new PushButton(test);
test2.setStylePrimaryName("nullButton");
bodyDragController.makeDraggable(test2);
test2.addClickHandler(new ClickHandler()
{   @Override
    public void onClick(ClickEvent event)
    {    System.out.println("Clicked");
    }
});

The onClick event does no fire even i set the DragStartSensitivity to > 0 as suggested... Any idea?

Rhystic

unread,
Jan 12, 2012, 11:41:42 AM1/12/12
to gwt...@googlegroups.com
Uhh nevermind, I found an alternate work around, instead of using pushbuttons, i used image with click listener, works well :)

Frederick van Staden

unread,
Jan 13, 2012, 1:06:36 AM1/13/12
to gwt...@googlegroups.com
I was wondering why you didn't do that in the first place =)


On Thu, Jan 12, 2012 at 6:41 PM, Rhystic <ykl...@gmail.com> wrote:
Uhh nevermind, I found an alternate work around, instead of using pushbuttons, i used image with click listener, works well :)

--
You received this message because you are subscribed to the Google Groups "gwt-dnd" group.
To view this discussion on the web visit https://groups.google.com/d/msg/gwt-dnd/-/fUa6-9B3vb4J.

Rhystic

unread,
Jan 13, 2012, 4:18:53 AM1/13/12
to gwt...@googlegroups.com
well didn't notice that image can have click listners lol, my memory only tell me that buttons has it x(
Reply all
Reply to author
Forward
0 new messages