{"key":3, "name":"unit Three", "loc":"384 319",
"leftArray":[ {"portColor":"#bd8f27", "portId":"left0"},
{"portColor":"#c14617", "portId":"left1"},
{"portColor":"#47fa60", "portId":"left2"} ],
"topArray":[ {"portColor":"#d08154", "portId":"top0"} ],
"bottomArray":[ {"portColor":"#6cafdb", "portId":"bottom0"} ],
"rightArray":[ ] }
Is the sideArray an array?
How to bind sideArray(topArray,bottomArray,rightArray,leftArray) and how do I display the portId of the sideArray in the inspector??
var inspector = new Inspector('myInspectorDiv', myDiagram,
{
// uncomment this line to only inspect the named properties below instead of all properties on each object:
// includesOwnProperties: false,
properties: {
"text": { },
// key would be automatically added for nodes, but we want to declare it read-only also:
"key": { readOnly: true, show: Inspector.showIfPresent },
// color would be automatically added for nodes, but we want to declare it a color also:
"color": { show: Inspector.showIfPresent, type: 'color' },
// Comments and LinkComments are not in any node or link data (yet), so we add them here:
"Comments": { show: Inspector.showIfNode },
"LinkComments": { show: Inspector.showIfLink },
"isGroup": { readOnly: true, show: Inspector.showIfPresent },
"flag": { show: Inspector.showIfNode, type: 'checkbox' },
"state": {
show: Inspector.showIfNode,
type: "select",
choices: function(node, propName) {
if (Array.isArray(node.data.choices)) return node.data.choices;
return ["one", "two", "three", "four", "five"];
}
},
"choices": { show: false }, // must not be shown at all
// an example of specifying the type
"password": { show: Inspector.showIfPresent, type: 'password' }
}
});