Binding function not fire

I have a lot of Bindings that use a source property that is an empty string.

new go.Binding(“stroke”, “”, this.bindShapeTextColor),

I set stroke

new go.Binding(“stroke”, “textColor”, this.bindShapeTextColor),

I change textColor color from my color palette but bindShapeTextColor not firing.

My node data:

no function is called
Why?

                         goMake(go.TextBlock,
                            {
                                editable: true,
                                stroke: "black",
                                font: "6pt sans-serif",
                                verticalAlignment: go.Spot.Center,
                                alignment: go.Spot.Center,
                                margin: new go.Margin(1, 5, 0, 5)
                            },
                            new go.Binding("stroke", "textColor", this.bindShapeTextColor),
                            new go.Binding("font", "textFontName", this.bindShapeTextFont),
                            new go.Binding("isUnderline", "textIsUnderline", this.bindShapeTextUnderline),
                            new go.Binding("background", "textBackgroundColor", this.bindShapeTextBackgroundColor),
                            new go.Binding("textAlign", "textIsItalic", this.bindShapeTextAlignment),
                        )

How did you set that data property? If you call Model.set, all of the appropriate Bindings should be evaluated.

  myDiagram.model.commit(function(m) {
    m.set(data, "textColor", …);
    . . . other modifications from your color palette or other HTML  . . .
  });

Be sure to conduct a transaction. The above code shows one way to do so.

I call Model.set but bindShapeTextColor not firing.

Example:

https://codepen.io/Sami61/pen/LYPKPQx?editors=0110

nodeConfig inside color not binding why?

My data nodeConfig inside textColor

does this pose a problem?

new go.Binding(“stroke”, “textColor”, this.bindShapeTextColor),

diagram.model.commit(m => {
                m.set(findInObject, propertyName, remakeData ? remakeData(findInObject[propertyName]) : setData);
            }, transactionType || TransactionTypes.Unknown);

Yes, putting the property not on the Node.data object but on a subsidiary object makes a big difference. It cannot know where to find that property.

Take a look at Binding data sub-properties. Note also that if you want to change that property value, as that sample does in the Inspector, not only do you have to first call Model.set but also call Model.updateTargetBindings with the “details” (in your case “nodeConfig”) property name.