ng-devui
Version:
DevUI components based on Angular
48 lines (47 loc) • 3.16 kB
TypeScript
import { AfterViewInit, ElementRef, NgZone, OnDestroy } from '@angular/core';
import { DragDropService } from '../services/drag-drop.service';
import { DropScrollAreaOffset, DropScrollDirection, DropScrollOrientation, DropScrollSpeed, DropScrollSpeedFunction, DropScrollTriggerEdge } from './drop-scroll-enhance.type';
import * as i0 from "@angular/core";
export declare class DropScrollEnhancedDirective implements AfterViewInit, OnDestroy {
private el;
private zone;
private dragDropService;
private doc;
minSpeed: DropScrollSpeed;
maxSpeed: DropScrollSpeed;
responseEdgeWidth: string | ((total: number) => string);
speedFn: DropScrollSpeedFunction;
direction: DropScrollDirection;
viewOffset: {
forward?: DropScrollAreaOffset;
backward?: DropScrollAreaOffset;
};
dropScrollScope: string | Array<string>;
backSpaceDroppable: boolean;
private forwardScrollArea;
private backwardScrollArea;
private subscription;
private forwardScrollFn;
private backwardScrollFn;
private lastScrollTime;
private animationFrameId;
document: Document;
constructor(el: ElementRef, zone: NgZone, dragDropService: DragDropService, doc: any);
ngAfterViewInit(): void;
ngOnDestroy(): void;
createScrollFn(direction: DropScrollDirection, orientation: DropScrollOrientation, speedFn: DropScrollSpeedFunction): (event: DragEvent) => void;
delegateDropEvent(event: DragEvent): void;
getCriticalEdge(direction: DropScrollDirection, orientation: DropScrollOrientation): DropScrollTriggerEdge;
getSecondEdge(direction: DropScrollDirection): DropScrollTriggerEdge;
createScrollArea(direction: DropScrollDirection, orientation: DropScrollOrientation): HTMLDivElement;
setAreaSize(area: HTMLElement, direction: DropScrollDirection, orientation: DropScrollOrientation): void;
setAreaStyleLayout(area: HTMLElement, direction: DropScrollDirection, orientation: DropScrollOrientation): void;
getRelatedPosition(target: any, relatedTarget: any, edge: DropScrollTriggerEdge, offsetValue?: number): string;
resizeArea(): void;
toggleScrollToOneEnd(scrollElement: any, toggleElement: HTMLElement, direction: DropScrollDirection, orientation: DropScrollOrientation): void;
cleanLastScrollTime(): void;
toggleActiveClass(target: any, active: any): void;
allowScroll(): boolean;
static ɵfac: i0.ɵɵFactoryDeclaration<DropScrollEnhancedDirective, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<DropScrollEnhancedDirective, "[dDropScrollEnhanced]", ["dDropScrollEnhanced"], { "minSpeed": { "alias": "minSpeed"; "required": false; }; "maxSpeed": { "alias": "maxSpeed"; "required": false; }; "responseEdgeWidth": { "alias": "responseEdgeWidth"; "required": false; }; "speedFn": { "alias": "speedFn"; "required": false; }; "direction": { "alias": "direction"; "required": false; }; "viewOffset": { "alias": "viewOffset"; "required": false; }; "dropScrollScope": { "alias": "dropScrollScope"; "required": false; }; "backSpaceDroppable": { "alias": "backSpaceDroppable"; "required": false; }; }, {}, never, never, false, never>;
}