diff options
| author | Nathan-SR <144961007+Nathan-SR@users.noreply.github.com> | 2024-06-15 00:08:00 -0400 |
|---|---|---|
| committer | Nathan-SR <144961007+Nathan-SR@users.noreply.github.com> | 2024-06-15 00:08:00 -0400 |
| commit | c472f9844ed2806f7965713cf618363210e37de1 (patch) | |
| tree | 6be42f28db78837a0305b310141e94de709a18b2 /src/client/views/collections/collectionSchema/CollectionSchemaView.tsx | |
| parent | 9866828b7b530b3f748509c55e3bb2c76dadce49 (diff) | |
text highlighting works with 'this.' format
Diffstat (limited to 'src/client/views/collections/collectionSchema/CollectionSchemaView.tsx')
| -rw-r--r-- | src/client/views/collections/collectionSchema/CollectionSchemaView.tsx | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx b/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx index ac9b57414..d75f076d2 100644 --- a/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx +++ b/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx @@ -523,16 +523,13 @@ export class CollectionSchemaView extends CollectionSubView() { this.removeCellHighlights(); const randomRGBColor = (): string[] => { - let r; let g; let b; const brightness = 450; - r = Math.floor(Math.random() * 256); - g = Math.floor(Math.random() * Math.min(256, brightness - r)); - b = Math.floor(brightness - r - g); + const r = Math.floor(Math.random() * 256); + const g = Math.floor(Math.random() * Math.min(256, brightness - r)); + const b = Math.floor(brightness - r - g); const lightenedRGB = ClientUtils.lightenRGB(r, g, b, 65); - const rL = lightenedRGB[0]; - const gL = lightenedRGB[1]; - const bL = lightenedRGB[2]; + const rL = lightenedRGB[0]; const gL = lightenedRGB[1]; const bL = lightenedRGB[2]; // prettier-ignore const bgdRGB = {rL, gL, bL}; return new Array<string>(`rgb(${r}, ${g}, ${b})`, `rgb(${bgdRGB.rL}, ${bgdRGB.gL}, ${bgdRGB.bL})`); @@ -542,7 +539,6 @@ export class CollectionSchemaView extends CollectionSubView() { this._highlightedCells = [...cellsToHighlight]; this._highlightedCells.forEach(cell => { const color = randomRGBColor(); - console.log('border: ' + color[0] + ' background: ' + color[1]) if (!this._cellHighlightColors.has(cell)) {this._cellHighlightColors.set(cell, new Array<string>(`solid 2px ${color[0]}`, color[1]))} cell.style.border = this._cellHighlightColors.get(cell)[0]; cell.style.backgroundColor = this._cellHighlightColors.get(cell)[1]; |
