Hello,

how i can remove attribute from user object?

asked 24 Jan '13, 10:00

Sadev's gravatar image

Sadev
12
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'];
link

answered 24 Jan '13, 17:48

Ltty's gravatar image

Ltty
629
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

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
×66
×39
×6
×1

Asked: 24 Jan '13, 10:00

Seen: 1,507 times

Last updated: 29 Jan '13, 18:12