Hi,

\n

I have a graph containing nested swimlanes. I want to make sure that vertices cannot be moved from its parent swimlane.

\n

Using mxGraphHandler.setRemoveCellsFromParent(false); works nicely when the user tries to move a vertex to the root (default) parent. However, if the user tries to move a vertex from one expanded swimlane to another he is allowed to do so.
\n

\n

The hack I am using now is to override the moveCells() method of mxGraphHandler:

\n
@Override\nprotected void moveCells(Object[] cells, double dx, double dy, Object target, MouseEvent e) {\n    super.moveCells(cells, dx, dy, null, e);\n}\n
\n

Is the behaviour intentional, or should I file a bug report?

\n

Cheers

asked 14 Mar '12, 06:51

Earthumb's gravatar image

Earthumb
2616
accept rate: 16%

edited 14 Mar '12, 06:51


This is intentional, try mxGraph.setDropEnabled(false)

link

answered 15 Mar '12, 02:18

Gaudenz's gravatar image

Gaudenz
80.1k1310
accept rate: 39%

Right, I'm an idiot. Tried it before but forgot about it. So many flags :-)

link

answered 15 Mar '12, 04:47

Earthumb's gravatar image

Earthumb
2616
accept rate: 16%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×79
×9

Asked: 14 Mar '12, 06:51

Seen: 1,513 times

Last updated: 15 Mar '12, 04:47