@n0gare wrote:
Hello,
I am trying to update to color of a textblock.
The textbock is attached to a node like this
diagram.nodeTemplate =
$(go.Node, "Table",
{
locationObjectName: "BODY",
toolTip: toolTipTemplate,
...
$(go.TextBlock, {
editable: true
},
new go.Binding("stroke", "fontcolor", function (d) {
if (d.R != null) {
console.log(d);
return 'rgba(' + d.R + ',' + d.G + ',' + d.B + ',' + d.A + ')';
}
else {
console.log(d);
return d;
}
}),and this is waht I do to update the textblock color
diagram.model.setDataProperty(itemData, "fontcolor", 'orange');
I hope you can suggest a solution
Best regards!
Posts: 1
Participants: 1