@turnert wrote:
I have a situation where, depending on the
lengthproperty of a node, I want to display different templates.Since this width can change via tools and updates to the node’s data, I have a binding on my template:
new go.Binding("width", "", (nodeData) => { if(nodeData.length === 0) this.diagram.model.setCategoryForNodeData(nodeData, "SmallTemplate"); return nodeData.length; }I have the inverse logic on my other template (
model.length > 0).What happens is the correct template is chosen initially, and the template will change once when I update the
lengthproperty, but then the template will never change again, even though I can step through the binding code in my debugger.Is there a better way to do this?
Posts: 5
Participants: 2