Palette -> updating multiple nodes of same type on diagram with different values

  1. I am trying to create a palette based canvas.
  2. I have created my own node definitions, each node has a a data property ‘configurations’ which is an array of fixed schema objects(‘name’,‘value’,‘defaultValue’,‘description’)
  3. When I drop two of these nodes onto the canvas, i want to update the configurations of the two nodes separately
  4. when i am updating the 2nd node with the configurations, the first node also assumes the same values, which is undesirable.

How do i make sure that the two nodes have separate configurations ?

Code snippet for adding palette nodes ->
` jQuery.each(activeGenomes, function(key, value) {

        inputSchema: value.inputSchema,
        outputSchema: value.outputSchema,
        configuration: value.configuration,
        jarName: value.jarName,
        className: value.className,
        fig: "hexagon",
        type: "genome"


Code Snippet for updating values of configs based on user input ->
`function updateNodeConfigurations() {

var clickedNodeKey =;

var clickedNode;
jQuery.each(genomeCanvas.model.nodeDataArray, function(key, node) {
console.log("comparing "+node.key+" with "+clickedNodeKey);
    if (node.key === clickedNodeKey){
        clickedNode = node;
        return false;

console.log("Subject part data : ";
console.log("Updating configurations for : " +;

jQuery.each(clickedNode.configuration, function(key, config) {

    //we are looping over each configuration of the clicked node

    configurationId = '#' + clickedNode.key + '_' +;
    var valueForConfiguration = jQuery(configurationId).val();

    console.log("config old value : " + + " : " + config.value);
    console.log("config new value : " + + " : " + valueForConfiguration);

    config.value = valueForConfiguration;
    //genomeCanvas.model.setDataProperty(clickedNode,"configuration", valueForConfiguration)

    return true;



It appears that you are sharing Objects, including Arrays, between nodes, when you do not want to do so.

Is the data.configuration property the only one that is of type Array? If so, it would be easiest to set these two properties on the Models of both the Palette and the Diagram:

You can find examples of this throughout the samples. One normally sets all of the properties of a model before setting Model.nodeDataArray and GraphLinksModel.linkDataArray.

Great ! your suggestion worked on setting copiesArrays and copiesArrayObjects on the Palette and the Diagram like so:
` //Set model properties on the canvas for enabling copy of array items instead of sharing
genomeCanvasModel.copiesArrayObjects = true;
genomeCanvasModel.copiesArrays = true;

//Set model properties on the genome palette for enabling copy of array items instead of sharing
genomePalette.model.copiesArrayObjects = true;
genomePalette.model.copiesArrays = true;

//Set model properties on the io palette for enabling copy of array items instead of sharing
ioPalette.model.copiesArrayObjects = true;
ioPalette.model.copiesArrays = true;`

Thank you for the prompt reply!