mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-29 00:06:09 +08:00
refactor(editor): move file drop manager to components (#9264)
This commit is contained in:
@@ -109,6 +109,12 @@ export class DragEventWatcher {
|
||||
};
|
||||
|
||||
private readonly _dropHandler = (context: UIEventStateContext) => {
|
||||
const raw = context.get('dndState').raw;
|
||||
const fileLength = raw.dataTransfer?.files.length ?? 0;
|
||||
// If drop files, should let file drop extension handle it
|
||||
if (fileLength > 0) {
|
||||
return;
|
||||
}
|
||||
this._onDrop(context);
|
||||
this._std.selection.setGroup('gfx', []);
|
||||
this.widget.clearRaf();
|
||||
|
||||
Reference in New Issue
Block a user