dikalo / lienzo-core

Lienzo Structure Graphics GWT Toolkit
Apache License 2.0
51 stars 58 forks source link

[JBPM-5546] Allow setting what clicks count as a drag for a panel #176

Closed Christopher-Chianelli closed 7 years ago

Christopher-Chianelli commented 7 years ago

Modified LienzoHandlerManager to only start the drag action when it is allowed. Created enum DragMouseControl which allow user to specify what mouse buttons cause a drag action for a LienzoPanel. Default currently is left mouse only, but could be changed to all mouse buttons to preserve previous behaviour. Based on the 2.0.287-RELEASE.

manstis commented 7 years ago

@Christopher-Chianelli Does this interfere with right-mouse button "context menu" handlers? Kie Workbench uses "context menu" handlers in the Guided Decision Table Editor to show context-menus when the right-mouse button is clicked over a Lienzo panel.

Christopher-Chianelli commented 7 years ago

It shouldn't @manstis; all this does is add a "check" to the mouse down event in LienzoHandler to see if dragging is allowed (if so, start dragging event, else, do nothing). I haven't touched anything related to context menu in the code, and the context menu still showed up when I ran this on the master branch of kie-workbench.

romartin commented 7 years ago

Hey @Christopher-Chianelli , It sounds good for me, I've tested this and it works fine as well, just added a comment for Dean too, so let's wait for @SprocketNYC and @manstis feedback on this. Thanks!