ageller / Firefly

A WebGL interactive particle viewer
GNU Affero General Public License v3.0
64 stars 12 forks source link

colorbar appears for particle type when colormap is not enabled #80

Closed agurvich closed 2 years ago

agurvich commented 2 years ago

To reproduce, enable the colormap for one particle group. Then go to the second particle group and change the colormap variable. the second particle group's colorbar will appear even though you have not enabled colormapping.

This does not occur if colormapping is disabled for all particle groups, however, if you enable colormapping for any of the particle groups then both colorbars will appear.

This suggests that when colormapping is disabled for all particle groups that the colorbar(s) are being appended to the div but since the width of div is 0 you don't see it.

Likely related to #75 .

agurvich commented 2 years ago

gated createColormapSVG in selectColormapVariable behind showColormap[p] so that if the colormap is disabled it won't populate the colorbar container.