Quantcast
Channel: GoJS - Northwoods Software
Viewing all articles
Browse latest Browse all 6969

Adding new node of another type when adding a node of other type in a group

$
0
0

@utpal wrote:

Hi,

Inside a group I am dropping a particular type of node(type A) which I am adding but along with that I also want to add another node(type B) whenever node of type A is dropped inside a group.I am using
addNodeData(data); functionality of GoJS library and written a code like this inside ValidateObject function
like this.But it is not working .

var data=new Array();
data["key"] = generateUUID();
data["text"] = "Post";
data["stroke"] = "#888";
data["background"] = "#F7CA18";
data["color"] = "#364150";
data["category"] = "Default";
data["geometryString"] = "M13.942 6.039c0.038-0.174 0.058-0.354 0.058-0.539 0-1.381-1.119-2.5-2.5-2.5-0.222 0-0.438 0.029-0.643 0.084-0.387-1.209-1.52-2.084-2.857-2.084-1.365 0-2.516 0.911-2.88 2.159-0.355-0.103-0.731-0.159-1.12-0.159-2.209 0-4 1.791-4 4s1.791 4 4 4h2v3h4v-3h3.5c1.381 0 2.5-1.119 2.5-2.5 0-1.23-0.888-2.253-2.058-2.461zM9 10v3h-2v-3h-2.5l3.5-3.5 3.5 3.5h-2.5z";
data["touchPointId"] = group.data.touchPointId;
data["connectionId"] = group.data.connectionId;
data["group"]= group.data.key;
data["type"] = 6;

model.addNodeData(data);

What I have to do?

Posts: 3

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 6969

Trending Articles