Hi,
I am working with a Flowchart and an Inspector.
In the init() function, I define the set of all the properties that a node might use:
function init() {
...
properties = {
"text": {readOnly: true, show: Inspector.showIfPresent},
"no_channels": {readOnly: false, show: Inspector.showIfPresent},
...
}
then I define my Inspector:
var inspector = new Inspector('myInspectorDiv', myDiagram, {
multipleSelection: true,
showSize: 10,
showAllProperties: false,
// includesOwnProperties: false,
properties: properties
});
and finally I add my nodes to the Palette:
var myPalette = $(go.Palette, "myPaletteDiv");
myPalette.nodeTemplateMap = myDiagram.nodeTemplateMap;
myPalette.model.nodeDataArray = [
{category: "X", text: "X", no_channels:0, ... },
{category: "Y", text: "Y", no_channels:0, ... },
...
];
Is there a way to make no_channels
read-only in node X
but editable in node Y
?
Thanks !