You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Perhaps this is a problem with the toJSON() function, but this is the origin of the problem. It creates node ids using the component, but the range of valid characters for component and process name are not the same - specifically, a component can contain the slash character '/', but processes cannot.
var makeNewId = function (label) {
var num = 60466176; // 36^5
num = Math.floor(Math.random() * num);
var id = label + '_' + num.toString(36);
return id;
};
...
newNode.id = makeNewId(node.component);
This results in us having to post-process the process names to make them valid (but also introduces a source of potential bugs since we should really ensure the process names are still unique).
Any thoughts on this?
The text was updated successfully, but these errors were encountered:
there doesn't seem to be any check to see if the new id is actually already used...did I miss something, or are we assuming duplicate random numbers are so unlikely that it won't ever happen?
Perhaps this is a problem with the toJSON() function, but this is the origin of the problem. It creates node ids using the component, but the range of valid characters for component and process name are not the same - specifically, a component can contain the slash character '/', but processes cannot.
This results in us having to post-process the process names to make them valid (but also introduces a source of potential bugs since we should really ensure the process names are still unique).
Any thoughts on this?
The text was updated successfully, but these errors were encountered: