Binding does not update on null value


I have a diagram in which nodes that are grouped may not be grouped again, therefore i use a binding:

new go.Binding('groupable', 'group', function(v) { return !v; })

It works when i group an object, but not when i ungroup it. I think it has to do with the fact that the group value is set to null. Because if i manually set it to an empty string (in a transaction) it does work. Is there a way to let the go.Binding also update on null values?

I also have another question, how do i best set the skipsUndo/redo for grouping and ungrouping events?


1: Bindings do get evaluated when === null, but not when the value is undefined.

Maybe you want to use instead of a Binding to “group”.

2: Override and to temporarily set

yes, awesome, thats what i needed :smile: