simularium / simularium-website

Front end website for the Simularium project, includes the Simularium viewer
https://simularium.allencell.org
Apache License 2.0
6 stars 3 forks source link

Wrong colors when loading files with different agent names locally #490

Closed blairlyons closed 4 months ago

blairlyons commented 5 months ago

Description

When successively loading local files with different agent types, the colors sometimes load incorrectly.

Expected Behavior

Colors should load correctly no matter which file was previously loaded.

Reproduction

  1. download hemoglobin 10ms and hemoglobin 30ms
  2. Go to https://simularium.allencell.org/viewer
  3. Load one file then the other (locally, by drag/drop or file dialog). The second file to load has the wrong colors for agents (usually some of them are yellow) but the left panel still has the correct colors for them (reds and blue).
  4. Load the same file twice and there's no problem. I've also tried with loading different files with the same agent names, and there's no problem. It only happens if the agent names are different.

Environment

Production, Firefox, MacOS

blairlyons commented 5 months ago

This is needed for work on iPub so high priority

interim17 commented 5 months ago

For context for anyone looking at this, I'm pretty sure it's a viewer bug and not in website, because the color swatches on the left panel are correct, and I can recreate it in the test bed. Poking around now.