diff options
author | bobzel <zzzman@gmail.com> | 2024-11-12 21:34:32 -0500 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2024-11-12 21:34:32 -0500 |
commit | 89ced11bf79543ca1c56a5fe610d301f29229c75 (patch) | |
tree | be83e1a348cc20e9fa7c42dfb113cf247a435649 | |
parent | d57fdc07fb88282903157b414c4a0886ddaf8bc6 (diff) |
changed cluster coloring to apply to all Docs that don't have the current default background color.
-rw-r--r-- | src/client/views/collections/collectionFreeForm/CollectionFreeFormClusters.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormClusters.ts b/src/client/views/collections/collectionFreeForm/CollectionFreeFormClusters.ts index 8530f7a23..f8958b141 100644 --- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormClusters.ts +++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormClusters.ts @@ -191,8 +191,8 @@ export class CollectionFreeFormClusters { setTimeout(() => doc && this.addDocument(doc)); } else { const palette = ['#da42429e', '#31ea318c', 'rgba(197, 87, 20, 0.55)', '#4a7ae2c4', 'rgba(216, 9, 255, 0.5)', '#ff7601', '#1dffff', 'yellow', 'rgba(27, 130, 49, 0.55)', 'rgba(0, 0, 0, 0.268)']; - // override palette cluster color with an explicitly set cluster doc color - return this._clusterSets[cluster]?.reduce((b, s) => StrCast(s.backgroundColor, b), palette[cluster % palette.length]); + // override palette cluster color with an explicitly set cluster doc color ONLY if doc color matches the current default text color + return this._clusterSets[cluster]?.reduce((b, s) => (s.backgroundColor !== Doc.UserDoc().textBackgroundColor ? StrCast(s.backgroundColor, b) : b), palette[cluster % palette.length]); } } } |