GoJS Context Menu and change the font size

I am pretty new in GoJs. I want to ask about Context Menu. I saw in the documentation that there is a really nice example how to change the color of the node (by right click = Context Menu). Seems pretty logic, but I am struggling how to change a font size of the text in node. I just don’t know how to get the value of the text font size. I get to the point that I can have a key: “obj.part.data.key” but what next? I know that I can’t just put font in nodeDataArray and I know that font is in nodeTemplate --> TextBlock, but I don’t know how to retrieve this data and hen change them.

Thank you.

The Mind Map sample, Mind Map , demonstrates context menu commands to increase and decrease the size of the node’s text.

The commands call the sample’s changeTextSize function which depends on a TwoWay Binding of the TextBlock.scale property in the node template.

1 Like