lab-cosmo / chemiscope

An interactive structure/property explorer for materials and molecules
http://chemiscope.org
BSD 3-Clause "New" or "Revised" License
119 stars 29 forks source link

A bug with the environment's coloring persists. #319

Closed MaximeScope closed 7 months ago

MaximeScope commented 7 months ago

When a environment is enabled and further disabled, changing the color property while keeping the environments disabled indeed updates the color for every atom, although a ghost of the previous environment's coloring remains on top of the current coloring. If the environment is then re-enabled and further re-disabled by the user, the "ghost" will disappear. But, changing the color property again will result in the same problem.

I tried to fix this issue today but I can't understand where the problem comes from. I need help @Luthaf

Although, I found another bug wwhere the color bar appeared when selecting a coloring per element again and fixed it!

ceriottm commented 7 months ago

I also noticed this problem, but have no clear idea how to fix it

Luthaf commented 7 months ago

The issue was that we did not remove the GLModel from 3Dmol renderer when switching off the environments highlighting. It was not caught previously because both models had the same color anyway. This and the color bar re-appearing should be fixed by #322