diff options
author | crupest <crupest@outlook.com> | 2021-05-06 22:01:12 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2021-05-06 22:01:12 +0800 |
commit | ccc9fd220ac52b2b24ebe9e5978a63fd2ec8c968 (patch) | |
tree | 6184aac232f9f327d4a8ddacdc7b226ff7617499 /FrontEnd/src/app/palette.ts | |
parent | 669b425e4795ce245c664c82223ee9fa4611dfa9 (diff) | |
download | timeline-ccc9fd220ac52b2b24ebe9e5978a63fd2ec8c968.tar.gz timeline-ccc9fd220ac52b2b24ebe9e5978a63fd2ec8c968.tar.bz2 timeline-ccc9fd220ac52b2b24ebe9e5978a63fd2ec8c968.zip |
feat: Timeline color.
Diffstat (limited to 'FrontEnd/src/app/palette.ts')
-rw-r--r-- | FrontEnd/src/app/palette.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/FrontEnd/src/app/palette.ts b/FrontEnd/src/app/palette.ts index 98e7d814..c4f4f4f9 100644 --- a/FrontEnd/src/app/palette.ts +++ b/FrontEnd/src/app/palette.ts @@ -95,9 +95,11 @@ const paletteSubject: BehaviorSubject<Palette> = new BehaviorSubject<Palette>( export const palette$: Observable<Palette> = paletteSubject.asObservable(); palette$.subscribe((palette) => { - let styleTag = document.getElementById("timeline-palette-css"); + const styleTagId = "timeline-palette-css"; + let styleTag = document.getElementById(styleTagId); if (styleTag == null) { styleTag = document.createElement("style"); + styleTag.id = styleTagId; document.head.append(styleTag); } styleTag.innerHTML = generatePaletteCSS(palette); |