i m calling the event linkdrawn and add few properties on link that was just dran but the inspector is not updating its html
there is suppose to be a relationship id in the html
i m calling the event linkdrawn and add few properties on link that was just dran but the inspector is not updating its html
Those “update” identifiers are functions and should be called, i.e. with parentheses.
It also does not make sense to try to call both of them consecutively.
no improvement even with parentheses or calling only to update html
Is the includesOwnProperties
option not set to false?
I suggest that you step through the code to see why it is behaving the way it is.
var inspector = new Inspector('myInfo', myDiagram, {
properties: {
"from": {
show: Inspector.showIfPresent
},
"to": {
show: Inspector.showIfPresent
},
"id": {
show: false
},
"key": {
readOnly: true,
show: Inspector.showIfPresent
},
"ObjectType": {
readOnly: true,
show: Inspector.showIfPresent
},
"fill": {
show: Inspector.showIfPresent,
type: 'color'
},
"RelationShipId": {
show: Inspector.showIfPresent,
type: 'color'
},
"isGroup": {
show: false
},
"desiredSize": {
show: false
},
"layout": {
show: false
},
"category": {
show: false
},
"primaryKey": {
show: Inspector.showIfPresent,
type: 'checkbox'
},
"foreignKey": {
readOnly: true,
show: Inspector.showIfPresent,
type: 'checkbox'
},
"AI": {
show: Inspector.showIfPresent,
type: 'checkbox'
},
"nullable": {
show: Inspector.showIfPresent,
type: 'checkbox'
},
"DT_type": {
show: Inspector.showIfPresent,
type: "select",
choices: function(link, propName) {
if (Array.isArray(link.data.choices)) return link.data.choices;
return {1:"INT", 4:"VARCHAR", 5:"FLOAT", 6:"Double", 20:"Bit"};
}
}
}
});
this is my inspector
So you are now only calling inspector.updateAllHTML()
?
I suggest that you step through the code and look carefully at all of the data to see what is happening.
yes i m only calling inspector.updateAllHTML()
in my linkdrawn event after it adds a property Relationshipid in the link
myDiagram.startTransaction(“add_prop”);
myDiagram.model.set(e.subject.data, “save”, false);
myDiagram.model.set(e.subject.data, RelationshipIdLabel, defaultLinkRelationshipId);
// myDiagram.model.set(e.subject.data, “key”, “”);
myDiagram.commitTransaction(“add_prop”);
inspector.updateAllHTML();