Disable drag and drop?

20 views
Skip to first unread message

Philippe Frangioni

unread,
Mar 19, 2010, 10:47:08 AM3/19/10
to gwt-connectors
Hi,
we want to use gwt-connectors in our project to draw quite simple
diagrams: just blocks and arrows connecting these blocks.
But we don't want the users to be able to move the different blocks
and connectors.

We made changes in gwt-connectors sources to be able to disable drag
and drop. Basically, we added a boolean parameter to Shape and
Connector constructors. When this boolean is true, all the drag and
drop related stuff is skipped.

It works fine but may not be the best since I think the javascript
code generated by the GWT compiler will still contain drag and drop
related code.
Maybe a better way to do this would be to have a Shape class with no
drag and drop capability and a DnDShape class extending Shape and
offering drag and drop capability (same thing for Connector and thus
for Section).
This way if a project uses only classes with no drag and drop, I think
the generated javascript code won't contain drag and drop related
code, since there won't be any import on a drag and drop related
class. (I am not sure about that though.)
Just wanted to know what you think about that?

KenJi_getpowered

unread,
Mar 20, 2010, 7:18:10 AM3/20/10
to gwt-connectors
Well in my opinion this is a very useful thing, I can imagine
possibilities.

another thing I would like to see implemented is curves not just
straight lines (as they did on gwt-diagram) and maybe that it goes a
little bit faster :p

KenJi_getpowered

unread,
Mar 20, 2010, 8:37:22 AM3/20/10
to gwt-connectors
Well in my opinion this is a very useful thing, I can imagine
possibilities.

another thing I would like to see implemented is curves not just
straight lines (as they did on gwt-diagram) and maybe that it goes a
little bit faster :p

On 19 mar, 15:47, Philippe Frangioni <pfrangi...@gmail.com> wrote:

KenJi_getpowered

unread,
Mar 24, 2010, 6:42:41 AM3/24/10
to gwt-connectors
Maybe you could share the code with us
Reply all
Reply to author
Forward
0 new messages