Skip to content

Commit

Permalink
fix(edgeless): toolbar resize observer is executed after element disc…
Browse files Browse the repository at this point in the history
…onnect (#8603)
  • Loading branch information
doouding committed Oct 25, 2024
1 parent c2889d9 commit 499d803
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,8 @@ export class EdgelessToolbarWidget extends WidgetComponent<
accessor containerWidth = 1920;

private _onContainerResize = debounce(({ w }: { w: number }) => {
if (!this.isConnected) return;

this.slots.resize.emit({ w, h: TOOLBAR_HEIGHT });
this.containerWidth = w;

Expand Down

0 comments on commit 499d803

Please sign in to comment.