@duoduo-oba/ng-devui
Version:
DevUI components based on Angular
40 lines (39 loc) • 2.24 kB
TypeScript
import { DropScrollSpeedFunction, DropScrollSpeed, DropScrollDirection, DropScrollAreaOffset, DropScrollOrientation, DropScrollTriggerEdge } from './drop-scroll-enhance.type';
import { ElementRef, NgZone, OnDestroy, AfterViewInit } from '@angular/core';
import { DragDropService } from '../services/drag-drop.service';
export declare class DropScrollEnhancedDirective implements AfterViewInit, OnDestroy {
private el;
private zone;
private dragDropService;
minSpeed: DropScrollSpeed;
maxSpeed: DropScrollSpeed;
responseEdgeWidth: string | ((total: number) => string);
speedFn: DropScrollSpeedFunction;
direction: DropScrollDirection;
viewOffset: {
forward?: DropScrollAreaOffset;
backward?: DropScrollAreaOffset;
};
dropScrollScope: string | Array<string>;
private forwardScrollArea;
private backwardScrollArea;
private subscription;
private forwardScrollFn;
private backwardScrollFn;
private lastScrollTime;
constructor(el: ElementRef, zone: NgZone, dragDropService: DragDropService);
ngAfterViewInit(): void;
ngOnDestroy(): void;
createScrollFn(direction: DropScrollDirection, orientation: DropScrollOrientation, speedFn: DropScrollSpeedFunction): (event: Event) => 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;
}