Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added check for missing DOM element when first rendering UI #310

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Added check for missing DOM element when first rendering UI
fixes #309
DC23 committed Dec 17, 2024
commit ee0e74b41e4408ed8843fd8466a1c1a94ed30bef
6 changes: 3 additions & 3 deletions src/uipanel.mjs
Original file line number Diff line number Diff line change
@@ -251,9 +251,9 @@ export class UIPanel extends HandlebarsApplicationMixin(ApplicationV2) {
* Called when cosmetic settings have been changed
*/
cosmeticSettingsChanged (render = true) {
this?.element.style.setProperty('--background-color', UIPanel.#uiBgColor)
this?.element.style.setProperty('--opacity-no-focus', UIPanel.#uiUnfocusedOpacity)
this?.element.style.setProperty('--opacity-focus', UIPanel.#uiFocusedOpacity)
this?.element?.style.setProperty('--background-color', UIPanel.#uiBgColor)
this?.element?.style.setProperty('--opacity-no-focus', UIPanel.#uiUnfocusedOpacity)
this?.element?.style.setProperty('--opacity-focus', UIPanel.#uiFocusedOpacity)
if (render) this.render()
}