Hello,
Below is my Inspector Properties.
myInspector = new Inspector(“myInspector”, myDiagram,
{
properties: {
id: { readOnly: true,show: Inspector.showIfNode},
key: { show: false },
pos: { show: false },
name: { show: Inspector.showIfNode },
text: { show: Inspector.showIfNode },
icon: { show: Inspector.showIfNode, type: “select”, choices: IconNames },
//color: { type: “select”, choices: ColorNames },
color: { show: true, type: ‘color’ },
//caption: { show: Inspector.showIfNode },
//imgsrc: { show: Inspector.showIfNode },
from: { show: false },
to: { show: false },
points: { show: false },
fromSpot: { show: Inspector.showIfLink, type: “select”, choices: SpotNames },
toSpot: { show: Inspector.showIfLink, type: “select”, choices: SpotNames },
//category: { show: Inspector.showIfLink, type: “select”, choices: ConnectorNames },
toarrowOption: { show: Inspector.showIfLink, type: “select”, choices: toArrowOptionNames },
fromarrowOption: { show: Inspector.showIfLink, type: “select”, choices: fromArrowOptionNames },
dash: { show: Inspector.showIfLink }
},
propertyModified: onSelectionChanged
});
Inspector has show property which is set based on Inspector.showIfLink,Inspector.showIfNode .
I had icon property and based on the selection I want to make some property visible or invisible.
eg: icon will have Inverter,Battery etc option which user can select. If user select Inverter I want some property ‘P1’ to be visible but if user select Battery then property ‘p1’ should be invisible.
Thanks
Pankaj