Closed GoogleCodeExporter closed 9 years ago
You can use CSS to temporarily highlight all the boundaries of the drop
targets. That
may help diagnosing the issue.
Original comment by fredsa@google.com
on 26 Mar 2010 at 6:24
Hi, Fred. I did that, and I also investigated this further. It turns out that
the
culprit is using RootPanel.get() for the PickupDragController's constructor
instead
of some other AbsolutePanel. In Firefox, none of the DropControllers were found
to
overlap any boundaries with the PickupDragController's constructor argument,
because
RootPanel.get() wasn't reporting the correct size: in my case, it said it
stretched
from (0,0) to (922,2). In IE, the size was correct. I wound up working around
this by
adding my Tree to an AbsolutePanel that contained only it, and that
AbsolutePanel was
then passed to the PickupDragController that the tree uses. It's possible that
another workaround is to assign Drag- and DropControllers to components only
*after*
they've all been added (on the assumption that the RootPanel will size itself
correctly), but that wasn't feasible in my case.
I haven't yet determined whether the bug is in GWT, or gwt-dnd. I have
confirmed that
the bug also exists in GWT 2.0.3 + gwt-dnd-3.0.1. Are you caching the
RootPanel's
size somewhere?
At the very minimum, the GettingStarted document should be updated to use an
AbsolutePanel *other* than the one returned by RootPanel.get().
Original comment by nrit...@gmail.com
on 26 Mar 2010 at 10:02
I clarified the wiki and javadoc on this point
Original comment by fredsa@google.com
on 26 Mar 2010 at 11:49
Original issue reported on code.google.com by
nrit...@gmail.com
on 23 Mar 2010 at 5:50Attachments: