Skip to content

Commit

Permalink
fix: Changed ‘mutationOberver’ to ‘mutationObserver’
Browse files Browse the repository at this point in the history
  • Loading branch information
kimhongyeon committed Jul 6, 2024
1 parent f28d400 commit 5eb3596
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/lib/FastImageSequence.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export class FastImageSequence {
private animationRequestId: number = 0;
private container: HTMLElement;
private resizeObserver: ResizeObserver;
private mutationOberver: MutationObserver;
private mutationObserver: MutationObserver;
private clearCanvas: boolean = true;
private speed: number = 0;
private prevFrame: number = 0;
Expand Down Expand Up @@ -128,7 +128,7 @@ export class FastImageSequence {
}
});

this.mutationOberver = new MutationObserver(() => {
this.mutationObserver = new MutationObserver(() => {
if (!this.container.isConnected) {
console.error('FastImageSequence: container is not connected to the DOM, fast image sequence will be destroyed');
this.destruct();
Expand Down Expand Up @@ -297,7 +297,7 @@ export class FastImageSequence {
}

this.resizeObserver.disconnect();
this.mutationOberver.disconnect();
this.mutationObserver.disconnect();

this.container.removeChild(this.canvas);
if (this.logElement && !isAddMoreFrames) {
Expand Down Expand Up @@ -335,7 +335,7 @@ export class FastImageSequence {

this.container.appendChild(this.canvas);
this.resizeObserver.observe(this.canvas);
this.mutationOberver.observe(this.container, {childList: true});
this.mutationObserver.observe(this.container, {childList: true});

// init all frames
this.frames = Array.from({length: this.options.frames}, (_, index) => new Frame(index));
Expand Down

0 comments on commit 5eb3596

Please sign in to comment.