UNPKG

ng2-dnd

Version:

Angular 2 Drag-and-Drop without dependencies

36 lines (35 loc) 1.37 kB
import { ElementRef } from 'angular2/core'; import { DragDropConfig } from './dnd.config'; import { DragDropService } from './dnd.service'; export declare abstract class AbstractComponent { _dragDropService: DragDropService; _config: DragDropConfig; _elem: HTMLElement; _defaultCursor: string; /** * Whether the object is draggable. Default is true. */ private _dragEnabled; dragEnabled: boolean; dropEnabled: boolean; /** * Array of Strings. It permits to specify the drop zones associated with this component. * By default, if the drop-zones attribute is not specified, the droppable component accepts * drop operations by all the draggable components that do not specify the allowed-drop-zones */ dropZones: string[]; constructor(elemRef: ElementRef, _dragDropService: DragDropService, _config: DragDropConfig); private _onDragEnter(event); private _onDragOver(event); private _onDragLeave(event); private _onDrop(event); private _isDropAllowed; private _onDragStart(event); private _onDragEnd(event); _onDragEnterCallback(event: Event): void; _onDragOverCallback(event: Event): void; _onDragLeaveCallback(event: Event): void; _onDropCallback(event: Event): void; _onDragStartCallback(event: Event): void; _onDragEndCallback(event: Event): void; }