Hi,
I just found that due to the recent update of your library we can see a huge change in the functionality of the code at our end. Earlier, I was using the code below to create a group template with three nodes:
this.AddNodeGroupTemplate = function (key, id, val, cid) {
var key1 = getGUID();
var key2 = getGUID();
var key3 = getGUID();
var data = model.nodeDataArray[model.nodeDataArray.length - 1];
model.startTransaction("AddNodeGroupTemplate");
model.setDataProperty(data, "text", "Get");
model.setDataProperty(data, "touchPointId", id);
model.setDataProperty(data, "connectionId", cid);
model.setDataProperty(data, "key", key);
model.setDataProperty(data, "type", 5);
model.setDataProperty(data, "geo", "get");
model.setDataProperty(data, "stroke", "#888");
model.setDataProperty(data, "background", "#32C5D2");
model.setDataProperty(data, "color", "#364150");
model.setDataProperty(data, "group", key1);
model.setDataProperty(data, "category", "Default");
model.setDataProperty(data, "angle", 180);
model.commitTransaction("AddNodeGroupTemplate");
this.addDatas([this.getProcess(id, key2, key1, cid), this.getPost(id, key3, key1, cid), this.getGroup(id, key1, val, cid)]);
this.addLinks([{ key: getGUID(), from: key, to: key2, text: '2', ExecutionOrder: 1 }, { key: getGUID(), from: key2, to: key3, text: '2', ExecutionOrder: 1 }]);
};
I wrote a function addDatas to add the nodes as below:
this.addDatas = function (datas) {
for (var i = 0; i < datas.length; i++)
this.addData(datas[i]);
};
I wrote a function addLinks to add the links within the nodes as below:
this.addLinks = function (datas) {
for (var i = 0; i < datas.length; i++)
this.addLink(datas[i]);
}
The template used to look like this:
But, now with the same code the template is having a single node only