TODO Does this need to be conditional for when single model is selected?
Sets a callback function to be called whenever the state specified in state_key changes. The return value callbackSwitch is a callback switch. You can activate the listener with callbackSwitch.activate() and deactive with callbackSwitch.deactivate(). Example Usage:
var callbackswitch = model.addStateKeyListener('name',()=>{
n_name_changes = n_name_changes+1;
})
the name of the state to listen to
the callback to be executed when state changes
the handle / unique identifier for
whether callbacks should happen synchronously or allow for batching
If a single object is selected then we will use its bounds as bounds. If multiple objects are selected then we will calculate bounds
initspecs should be a dictionary mapping snapshot keys to functions used to compute their initial values returns a function that takes a model as input and returns its snapshot dict.
Use the getter to add type constraints to 2d in subclass. E.g.,
get 2d():ASelection
Generated using TypeDoc
TODO Does this need to be conditional for when single model is selected?