API > @blocksuite/blocks > FileDropManager
Class: FileDropManager ​
Constructors ​
constructor ​
new FileDropManager(
_editor
):FileDropManager
Parameters ​
Parameter | Type |
---|---|
_editor | AbstractEditor |
Returns ​
Defined In ​
packages/blocks/src/_common/components/file-drop-manager.ts:45
Properties ​
_editor ​
private
_editor:AbstractEditor
Defined In ​
packages/blocks/src/_common/components/file-drop-manager.ts:38
_handlers ​
private
_handlers:FileDropRule
[] =[]
Defined In ​
packages/blocks/src/_common/components/file-drop-manager.ts:43
_indicator ​
private
_indicator:DragIndicator
Defined In ​
packages/blocks/src/_common/components/file-drop-manager.ts:40
_point ​
private
_point:null
|Point
=null
Defined In ​
packages/blocks/src/_common/components/file-drop-manager.ts:41
_result ​
private
_result:null
|DropResult
=null
Defined In ​
packages/blocks/src/_common/components/file-drop-manager.ts:42
Methods ​
_onDropEnd ​
private
_onDropEnd(point
,models
,result
):void
Parameters ​
Parameter | Type |
---|---|
point | Point |
models | Partial < BaseBlockModel < object > >[] |
result | null | DropResult |
Returns ​
void
Defined In ​
packages/blocks/src/_common/components/file-drop-manager.ts:121
clear ​
clear():
void
Returns ​
void
Defined In ​
packages/blocks/src/_common/components/file-drop-manager.ts:201
findFileHandler ​
findFileHandler(
file
):undefined
|ImportHandler
Parameters ​
Parameter | Type |
---|---|
file | File |
Returns ​
undefined
| ImportHandler
Defined In ​
packages/blocks/src/_common/components/file-drop-manager.ts:187
onDragOver ​
onDragOver(
event
):void
Parameters ​
Parameter | Type |
---|---|
event | DragEvent |
Returns ​
void
Defined In ​
packages/blocks/src/_common/components/file-drop-manager.ts:58
onDrop ​
onDrop(
event
):Promise
<void
>
Parameters ​
Parameter | Type |
---|---|
event | DragEvent |
Returns ​
Promise
< void
>
Defined In ​
packages/blocks/src/_common/components/file-drop-manager.ts:84
register ​
register(
rule
):void
Registers a processing function to handle the specified type.
Parameters ​
Parameter | Type |
---|---|
rule | FileDropRule |
Returns ​
void
Defined In ​
packages/blocks/src/_common/components/file-drop-manager.ts:195