| 202 | 201 | Also, {{{chimera.openModels.addRemoveHandler(func, data)}}} might be used to add a trigger handler when removing models. This might be useful in the creation of a state instance as a way to maintain integrity or validity of the saved state. It may depend on whether the state instance keeps a reference or a copy of models in the saved state. For efficiency, it is better to keep a reference. For validity, it could be better to keep a copy. Perhaps a copy is required only when a model is removed, so the copy action could be triggered then. If a state instance that is registered as a handler is deleted, then call {{{chimera.openModels.deleteRemoveHandler(handler)}}} to delete the trigger handler. |