fix(editor): should toggle toolbar when creating connector via auto complete (#11862)

Closes: [BS-2403](https://linear.app/affine-design/issue/BS-2403/[improvement]-edgeless-拖出-connector-时,yuan素的-toolbar-需要消失)
This commit is contained in:
fundon
2025-04-24 16:04:45 +00:00
parent cce31e822f
commit aae65d231c
2 changed files with 105 additions and 0 deletions

View File

@@ -27,6 +27,7 @@ import {
ShapeElementModel,
shapeMethods,
} from '@blocksuite/affine-model';
import { ToolbarRegistryIdentifier } from '@blocksuite/affine-shared/services';
import { handleNativeRangeAtPoint } from '@blocksuite/affine-shared/utils';
import { DisposableGroup } from '@blocksuite/global/disposable';
import type { Bound, IVec } from '@blocksuite/global/gfx';
@@ -211,6 +212,8 @@ export class EdgelessAutoComplete extends WithDisposable(LitElement) {
point,
otherSideId ? [otherSideId] : []
);
this.std.get(ToolbarRegistryIdentifier).flags.hide();
}
});
@@ -222,6 +225,8 @@ export class EdgelessAutoComplete extends WithDisposable(LitElement) {
this._createAutoCompletePanel(e, connector);
}
this.std.get(ToolbarRegistryIdentifier).flags.show();
this._isMoving = false;
this.connectionOverlay.clear();
this._disposables.dispose();