Closed GoogleCodeExporter closed 9 years ago
Also, MouseDragHandler is a package-protected one, so there is no way to extend
it
Original comment by shaman.sir
on 7 Sep 2011 at 1:24
...and DragContext constructor is not visible :(
Original comment by shaman.sir
on 7 Sep 2011 at 1:32
Implementations are kept as closed as possible, in order to enable free
refactoring and optimization, without worrying about dependencies. Sorry, but
experience has taught me that this is much better for the overall stability and
health of the library.
Original comment by fredsa@google.com
on 15 Sep 2011 at 4:53
I agree that it is a bad idea to open up for inheritance that is not needed. A
better solution would be to move all the functionality that could be reused out
in independent classes, in that way the dependencies would be the same for the
current implementation. Other developers would then be able to make their own
DragController without copy paste all the source, but instead using the
functionality from the new classes. They will add new dependencies to the
classes but that does not have any impact on your implementation.
Another nice thing would be to move the dependency to the MouseDragHandler away
from the AbstractDragController (maybe to the PickupDragController). In that
way it would be possible to inherit AbstractDragController without being forced
to be triggered on a mouse down event for starting the drag functionality.
This was just some thoughts on how the framework could be improved for
developers.
Appreciate your work!
Original comment by mw.johnd...@gmail.com
on 24 Oct 2011 at 12:12
Yes, through time, I will may be agree with that. I can extend a DragController
and store the information I need there, though one DragController has one
DragContext...
But that'd be ok, if I'd need just to store information. But I need to change a
little on how MouseDragContext works (allow it to create Canvas instances in
some cases, wrapping them with widgets. Or just projecting a draggable with
putImageData : the logic stays same, but implementation changes. However, it is
enough complicated "extension" to make it a separate twin project like
gwt-dnd-on-canvas and may be it is ok to copy/modify code for it?
Original comment by shaman.sir
on 24 Oct 2011 at 1:23
Original comment by fredsa
on 31 Jan 2012 at 6:15
Original issue reported on code.google.com by
shaman.sir
on 7 Sep 2011 at 1:17