Skip to content

Commit

Permalink
web: Observe align changes for player element
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhjacobs authored Dec 27, 2024
1 parent e8b2415 commit 60ae653
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,15 @@ export class RufflePlayerElement extends HTMLElement implements PlayerElement {
}

static get observedAttributes(): string[] {
return ["width", "height"];
return ["width", "height", "align"];
}

attributeChangedCallback(
name: string,
_oldValue: string | undefined,
_newValue: string | undefined,
): void {
if (name === "width" || name === "height") {
if (name === "width" || name === "height" || name === "align") {
this.#inner.updateStyles();
}
}
Expand Down

0 comments on commit 60ae653

Please sign in to comment.