I'm using edge style mxEdgeStyle.OrthConnector, and I execute a layout:

\n
var first = new mxHierarchicalLayout(graph);\nfirst.disableEdgeStyle = false;\nvar second = new mxParallelEdgeLayout(graph);\nvar layout = new mxCompositeLayout(graph, [first, second], first);\nlayout.execute(graph.getDefaultParent());\n
\n

After the layout, the edge style appears to still be mxEdgeStyle.OrthConnector, but the connection points have changed, and new right-angle bends have been inserted. Here is a before and after snippet:

\n

Before:

\n

alt text

\n

After:

\n

alt text

\n

How can I force the edges to connect to the rhombus, and not to the perimeter of the rectangle that contains the rhombus?

\n

Thanks,

\n

Clark

asked 23 Feb '12, 12:48

Clark%20Rasmussen's gravatar image

Clark Rasmussen
21112
accept rate: 0%


Use the rhombusPerimeter, eg. 'shape=rhombus;perimeter=rhombusPerimeter' in the style.

link

answered 23 Feb '12, 22:12

Gaudenz's gravatar image

Gaudenz
80.1k1310
accept rate: 39%

Thanks! That works perfectly. Could I have found this in the API docs? I have looked for a catalog of styles that can be applied to various cells.

(27 Feb '12, 12:40) Clark Rasmussen

Probably in mxPerimeter.

(27 Feb '12, 20:07) Gaudenz
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:

×228
×13
×8

Asked: 23 Feb '12, 12:48

Seen: 1,917 times

Last updated: 27 Feb '12, 20:07