glue-jupyter
glue-jupyter copied to clipboard
Add an option to change the behavior of the debounce function
When panning around, the current debounce method works nicely. However, when changing slice in the n-dimensional data, it would be nice to have the image change while the slice is being changed, but at the same time we don't want all the calls to build up, so we still want something similar to debounce, but which does guarantee execution of the function as fast as possible, dropping any calls that pile up.
So would you want in these terms: https://css-tricks.com/debouncing-throttling-explained-examples/ a 'leading debouce'?