Hi,

\n

I like the org chart example. My plan was more to dynamically generate the org chart, adding layers of children etc as people click on them.

\n

One thing in the example I couldn't see was how to add a 'peer'. Clicking on the 'add' sign adds a child only. I don't suppose there is an example that shows how this would be done?

\n

Thanks

asked 11 Oct '11, 15:42

glinkot's gravatar image

glinkot
1
accept rate: 0%

Now I look at it more closely, I think it does indeed support this! Thanks though.

(12 Oct '11, 23:40) glinkot

var overlay = new mxCellOverlay(new mxImage('images/add.png', 24, 24), 'Add Peer');\noverlay.cursor = 'hand';\noverlay.align = mxConstants.ALIGN_RIGHT;\noverlay.verticalAlign = mxConstants.ALIGN_MIDDLE;\noverlay.addListener(mxEvent.CLICK, mxUtils.bind(this, function(sender, evt)\n{\n  var model = graph.getModel();\n  addChild(graph, model.getTerminal(model.getEdges(cell)[0], true));\n}));\n\ngraph.addCellOverlay(cell, overlay);\n
link

answered 12 Oct '11, 23:40

Gaudenz's gravatar image

Gaudenz ♦♦
7.4k15
accept rate: 31%

I don not understand how it work, somebody can explain how to start create org chart, or send me tutorial.

(06 Feb, 03:54) michaelf
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:

×19

Asked: 11 Oct '11, 15:42

Seen: 246 times

Last updated: 06 Feb, 04:45

powered by BitNami OSQA