Closed GoogleCodeExporter closed 9 years ago
You code contains:
dragController = new PickupDragController(this, true);
which allows dropping on the boundary panel.
I think this will fix it:
dragController = new PickupDragController(this, false);
Original comment by fredsa@google.com
on 23 Feb 2011 at 8:53
Of course, thanks for the detailed use case on App Engine, and a link to the
source code. That made it super easy for me to look at and diagnose!
Do let me know if the solution does not work for you.
THANKS
Original comment by fredsa@google.com
on 23 Feb 2011 at 8:53
Thanks for the speedy response.
The problem is that I do want to restrict the dropping to the boundary panel
but it isn't restricting it properly when the widget is dragged completely off
the boundary panel.
ok.png - works fine where the widget is dropped when partially outside of the
boundary panel.
In not_ok1.png I am about to drop it completely above the boundary panel. In
not_ok2.png you can see that it ends up with the correct y coordinate but the x
coordinate isn't constrained to the grid.
When I tried your suggestion of changing true to false then when I dropped it
outside it ended up where it was at the start of the drag which isn't
desirable. Where it currently ends up is fine if was constrained to the nearest
grid location in both coordinates.
Original comment by ToonT...@gmail.com
on 25 Feb 2011 at 8:44
Attachments:
The second argument to the PickupDragController constructor is
allowDroppingOnBoundaryPanel, so you want that to be false.
I think want you want to call is
setBehaviorConstrainedToBoundaryPanel(true)
Original comment by fredsa@google.com
on 9 Mar 2011 at 1:57
When I change it to false and attempt to drag a widget beyond the boundary
panel then the widget stops at the border (good) but if the mouse is outside of
the boundary panel when the mouse button is released then the widget ends up
going back to where it last was. I want it to snap to the grid just inside the
border of the boundary panel (as it almost always does when
allowDroppingOnBoundaryPanel is true). It seems to me that
GridConstrainedSelectionStyleDropController isn't working right when the mouse
button is released outside the panel. The drop is constrained to the grid in
only one dimension.
Original comment by ToonT...@gmail.com
on 9 Mar 2011 at 9:15
Any news on this? Its still not working as intended
Original comment by l...@simplefitness.dk
on 18 Aug 2011 at 8:31
Original issue reported on code.google.com by
ToonT...@gmail.com
on 20 Feb 2011 at 6:18