with_spinner#

jdaviz.core.template_mixin.with_spinner(spinner_traitlet='spinner', truthy=True)[source]#

decorator on a plugin method to set a traitlet to True (or the passed string) at the beginning and False (or an empty string) either on failure or successful completion. This traitlet can then be used in the UI to disable elements or display a spinner during operation.

Each plugin gets a ‘spinner’ traitlet by default, but some plugins may want different controls for different sections/actions within the plugin.