I’m trying to remove a property from an object that is within my model (associated with a port). I use model.setDataProperty(object, propertyName, newvalue) to update such values, but in this case I wish for propertyName to be removed from object altogether, and to have this modification be subject to the undo machinery. What is the proper way to accomplish this?
GoJS models and bindings do not distinguish when a property does not exist on an object and when a property does exist but the value is undefined, so if you really need to delete the property rather than set it to undefined, I’m not sure there’s a good simple solution. Maybe via side effect a property setter could remove itself?