diff --git a/app/assets/javascripts/outfit-viewer.js b/app/assets/javascripts/outfit-viewer.js index cd298ed6..3a7ba6de 100644 --- a/app/assets/javascripts/outfit-viewer.js +++ b/app/assets/javascripts/outfit-viewer.js @@ -1,4 +1,11 @@ class OutfitLayer extends HTMLElement { + #internals; + + constructor() { + super(); + this.#internals = this.attachInternals(); + } + connectedCallback() { setTimeout(() => this.#initializeImage(), 0); } @@ -16,7 +23,8 @@ class OutfitLayer extends HTMLElement { } #setStatus(newStatus) { - this.setAttribute("status", newStatus); + this.#internals.states.clear(); + this.#internals.states.add(newStatus); } } diff --git a/app/assets/stylesheets/items/_show.sass b/app/assets/stylesheets/items/_show.sass index dbfcbf78..bfb71d4b 100644 --- a/app/assets/stylesheets/items/_show.sass +++ b/app/assets/stylesheets/items/_show.sass @@ -58,7 +58,7 @@ body.items-show width: 100% height: 100% - &:has(outfit-layer[status="loading"]) + &:has(outfit-layer:state(loading)) background: gray .species-color-picker