Hi averybody.

\n

I'm trying to insert second label. Just insert a child in each cell. Work perfectly, but when i try adjust layout he just move the first cell and throw the follow error: this.graph.view.updateLabelBounds is not a function and don't work.

\n

This is a bug? What i have to do to layout work?

\n

Thanks

asked 22 Sep '11, 05:31

Vinicius%20Roberto's gravatar image

Vinicius Roberto
314
accept rate: 0%

Please provide us with enough information to recreate the problem. Which layout did you apply? Do you have a simple example that recreates the problem?

(22 Sep '11, 05:45) David

Yeah! I,m using the layout function like the example in MainPanel.js. I saw that just happen when I try animate, without animate work fine.

\n

I'm constructing the second labels using the follow function:

\n
function(cell, value){\n    var graph = this.moiraeGraph.graph;\n\n    graph.getModel().beginUpdate();\n    try{\n        var secondLabel = graph.insertVertex(cell, null, value, 1, 1, 0, 0, 'align=left;verticalAlign=top;fillColor=red;rounded=1;spacingLeft=4;spacingRight=4');\n        secondLabel.geometry.offset = new mxPoint(-8, -8);\n        secondLabel.geometry.relative = true;\n        graph.updateCellSize(secondLabel);\n    } finally {\n        graph.getModel().endUpdate();\n    }\n
\n

like you can see in the follow image:

\n

alt text

\n

And i'm just override the function isCellFoldable.

\n

After I execute the vertical tree layout I have this image and the given error in loop

\n

alt text

link

answered 22 Sep '11, 06:03

Vinicius%20Roberto's gravatar image

Vinicius Roberto
314
accept rate: 0%

So this error only occurs when you add the second label, or does it happen without that second label code?

(23 Sep '11, 00:50) David

This error occurs when I try execute any layout, execept circle layout, with second label. And i look de debug mxclient file and I really can't find this function.

(23 Sep '11, 04:27) Vinicius Roberto
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:

×29

Asked: 22 Sep '11, 05:31

Seen: 1,555 times

Last updated: 23 Sep '11, 04:27