Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • FileDrop

Index

Constructors

constructor

  • new FileDrop(element: HTMLElement): FileDrop

Properties

Private element

element: HTMLElement

The 'dropzone' element.

memberof

FileDrop

member

{HTMLElement}

Private fileDroppedCallbackBinary

fileDroppedCallbackBinary: IDroppedCallbackBinary | null

The binary file drop callback.

memberof

FileDrop

member

{HTMLElement}

Private fileDroppedCallbackJSON

fileDroppedCallbackJSON: IDroppedCallbackJSON | null

The JSON file drop callback.

memberof

FileDrop

member

{HTMLElement}

Private fileDroppedCallbackSVG

fileDroppedCallbackSVG: IDroppedCallbackSVG | null

The SVG file drop callback.

memberof

FileDrop

member

{HTMLElement}

Private fileDroppedCallbackText

fileDroppedCallbackText: IDroppedCallbackText | null

The text file drop callback.

memberof

FileDrop

member

{HTMLElement}

Methods

destroy

  • destroy(): void

Private handleDragLeaveEvent

  • handleDragLeaveEvent(event: DragEvent): void
  • Restored the drop sensitive element's opacity back to 1.0.

    Parameters

    • event: DragEvent

      The event.

    Returns void

Private handleDragOverEvent

  • handleDragOverEvent(event: DragEvent): void

Private handleDropEvent

  • handleDropEvent(event: DragEvent): void

onFileJSONDropped

  • Install the JSON (MIME type json*) file drop callback. Note than only one callback can be installed in this implementation. Calling this method multiple times will overwrite previously installed listeners.

    The callback will receive the dropped file content as an object (parsed JSON).

    Parameters

    Returns void

onFileSVGDropped

onFileTextDropped

  • Install the text file (MIME type text/plain) drop callback. Note than only one callback can be installed in this implementation. Calling this method multiple times will overwrite previously installed listeners.

    The callback will receive the dropped file content as a string.

    Parameters

    Returns void

Legend

  • Constructor
  • Property
  • Method
  • Property
  • Method
  • Inherited property
  • Inherited method
  • Private property
  • Private method
  • Static property
  • Static method

Generated using TypeDoc