I am trying to build an editor where vertex labels can be edited by users. However, I want to ensure that no two vertices have the same label. An error should be popped-up during in-place editing when a vertex has the same label as another vertex. How do I do this? -- Regards, NM

asked 11 Jun '12, 09:37

nmandya's gravatar image

accept rate: 0%

You can implement this in an overridden mxGraph.labelChanged or mxGraph.cellLabelChanged.


answered 12 Jun '12, 02:06

Gaudenz's gravatar image

accept rate: 39%

Thanks for the response. I did try that. But if another vertex with the same label already exists, how do I indicate that the new value being set by the user should not be accepted? This is not clear from the documentation. -- Regards, NM


answered 12 Jun '12, 06:18

nmandya's gravatar image

accept rate: 0%

"An error should be popped-up"

(12 Jun '12, 07:07) Gaudenz

Thanks, I figured that if I do not want the label to be changed, I should not invoke the labelChanged method from mxGraph.prototype.

(12 Jun '12, 08:13) nmandya
Your answer
toggle preview

Follow this question

By Email:

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



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



Asked: 11 Jun '12, 09:37

Seen: 1,372 times

Last updated: 12 Jun '12, 08:13