Skip to content

Commit

Permalink
fix: initialize
Browse files Browse the repository at this point in the history
  • Loading branch information
doouding committed Dec 17, 2024
1 parent 4c5477f commit 5929ec2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/affine/block-surface/src/view/mindmap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ export class MindMapView extends GfxElementModelView<MindmapElementModel> {

private _initCollapseButtons() {
const updateButtons = requestThrottledConnectedFrame(() => {
if (!this.isConnected) {

Check failure on line 29 in packages/affine/block-surface/src/view/mindmap.ts

View workflow job for this annotation

GitHub Actions / Build

Property 'isConnected' does not exist on type 'MindMapView'.
return;
}

const visited = new Set<LocalShapeElementModel>();

this.model.traverse(node => {
Expand Down Expand Up @@ -63,6 +67,8 @@ export class MindMapView extends GfxElementModelView<MindmapElementModel> {
this.disposable.add(() => {
this.model.children.unobserve(updateButtons);
});

updateButtons();
}

private _needToUpdateButtonStyle(options: {
Expand Down

0 comments on commit 5929ec2

Please sign in to comment.