with_temp_disable#

jdaviz.core.template_mixin.with_temp_disable(timeout=0.3, disable_traitlet='previews_temp_disabled', time_traitlet='previews_last_time')[source]#

decorator on a plugin method to track the amount of time the wrapped method takes, and disable live plugin-previews if it takes longer than timeout seconds. The wrapped method should also observe disable_traitlet (‘previews_temp_disabled’, by default).

This should be used with:

<plugin-previews-temp-disabled
  :previews_temp_disabled.sync="previews_temp_disabled"
  :previews_last_time="previews_last_time"
  :show_live_preview.sync="show_live_preview"
/>