how i can remove attribute from user object?

asked 24 Jan '13, 10:00

Sadev's gravatar image

accept rate: 0%

edited 24 Jan '13, 12:20

for example you have a user object which is inserted as value for a new vertex:

var userObj= {"id":"123", "firstname": "John", "lastname": "Doe"};
graph.insertVertex(graph.getDefaultParent(), userObj.id, userObj, 0, 0, 100, 100);

You can get the cell from the model and delete an attribute of the user object if you know its id using:

var cell = graph.getModel().getCell('id');
delete cell.value['firstname'];

answered 24 Jan '13, 17:48

Ltty's gravatar image

accept rate: 25%

Thank you very much for the response. You know how to override user object? For example, i want to change: <relationnode source="47" target="49" id="51"> ... </relationnode> in <newname source="47" target="49" id="51"> ... </newname>

(29 Jan '13, 12:16) Sadev
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: 24 Jan '13, 10:00

Seen: 1,507 times

Last updated: 29 Jan '13, 18:12