yt-project / widgyts

Widgets for yt
https://widgyts.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
10 stars 10 forks source link

Add logic in colormaps widget to bypass reloading colormaps #7

Closed munkm closed 6 years ago

munkm commented 6 years ago

The colormaps widget starts by loading all of the matplotlib colormaps from python, syncing it to js, and then loading all of these into the colormaps module in wasm. The current logic reloads colormaps into wasm every time a function on the js side of the colormaps widget is called. This can be bypassed with checks in the promises of the colormaps js functions.

See discussion in https://github.com/data-exp-lab/yt-canvas-widget/pull/6 for more detail on doing this.