diff options
| author | bobzel <zzzman@gmail.com> | 2025-01-21 10:16:51 -0500 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2025-01-21 10:16:51 -0500 |
| commit | caf384bb374c47118296aa397446e85d3121116b (patch) | |
| tree | da270043f88d6cfa0d6b8f1838a55f6faba35bfa /src/client/views/collections/collectionFreeForm/CollectionFreeFormClusters.ts | |
| parent | 22daafa9c505eb9bffb8604be0924a7450d20113 (diff) | |
| parent | a6a6929501b7ce9b3ceed73c7e8141a8d8f0c7dc (diff) | |
Merge branch 'master' into alyssa-agent
Diffstat (limited to 'src/client/views/collections/collectionFreeForm/CollectionFreeFormClusters.ts')
| -rw-r--r-- | src/client/views/collections/collectionFreeForm/CollectionFreeFormClusters.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormClusters.ts b/src/client/views/collections/collectionFreeForm/CollectionFreeFormClusters.ts index 8530f7a23..3838852dd 100644 --- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormClusters.ts +++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormClusters.ts @@ -186,13 +186,13 @@ export class CollectionFreeFormClusters { case StyleProp.BackgroundColor: { const cluster = NumCast(doc?.layout_cluster); - if (this.Document._freeform_useClusters && doc?.type !== DocumentType.IMG) { + if (this.Document._freeform_useClusters && doc?.type !== DocumentType.IMG && !doc.layout_isSvg) { if (this._clusterSets.length <= cluster) { 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]); } } } |
