refactor(editor): move file drop manager to components (#9264)

This commit is contained in:
Saul-Mirone
2024-12-24 02:20:03 +00:00
parent 74a168222c
commit b29cb5945a
16 changed files with 321 additions and 261 deletions
@@ -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();