yt-project / widgyts

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

minor refactoring normalizer function and listeners in colormap widget #11

Closed munkm closed 6 years ago

munkm commented 6 years ago

The normalize() function now uses the Model-level variables for map_name, min and max vals, is_log, and data_array rather than taking arguments. This function already modifies a Model-level variable (the image_array), so this ensures consistency within the Model.

The js and python listeners for the Model variables in the colormap widget originally returned a promise from the normalizer. Now they call normalize but don't return the promise.