Skip to content

Commit

Permalink
chore: Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
manzt committed Jul 15, 2024
1 parent 0e0a0ca commit 25c9a54
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export function createViewer(element: HTMLElement): Promise<VizarrViewer> {
const emitter = typedEmitter<Events>();
const viewStateAtom = atomWithEffect<ViewState | undefined, ViewState>(
atom<ViewState | undefined>(undefined),
({ zoom, target }) => emitter.emit('viewStateChange', { zoom, target }),
({ zoom, target }) => emitter.emit('viewStateChange', { zoom, target })
);
const { promise, resolve } = defer<VizarrViewer>();

Expand Down
3 changes: 1 addition & 2 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,5 @@ export function typedEmitter<T>() {
emit: <E extends keyof T & string>(event: E, data: T[E]) => {
target.dispatchEvent(new CustomEvent(event, { detail: data }));
},
}
};
}

0 comments on commit 25c9a54

Please sign in to comment.