@azerafati/ngx-scroll-drag
Version:
[](https://github.com/azerafati/scroll-drag/actions) [ • 1.98 kB
TypeScript
import { AfterViewInit, ElementRef, EventEmitter, OnDestroy, OnInit, Renderer2 } from '@angular/core';
import * as i0 from "@angular/core";
declare enum Direction {
Top = "top",
Bottom = "bottom",
Right = "right",
Left = "left"
}
export type ShadowDir = {
[key in Direction]: boolean;
};
export declare class ScrollDragDirective implements OnInit, AfterViewInit, OnDestroy {
private elemRef;
private renderer;
scrollDirection: 'Horizontal' | 'Vertical';
scrollShadow: boolean;
shadowChange: EventEmitter<{
direction: Direction;
isShown: boolean;
}>;
backgroundColor: string;
disableDrag: boolean;
shadow: ShadowDir;
private dateScrollChange$;
private dateScrollChangeSubscription?;
private inertia;
private scrollDragSnap;
private startDragY?;
private startDragX?;
private isPressed;
private readonly element;
constructor(elemRef: ElementRef, renderer: Renderer2);
set ngxScrollDrag(value: number | string | undefined);
ngAfterViewInit(): void;
startDrag(ev: MouseEvent): void;
drag(ev: MouseEvent): void;
leave(ev: MouseEvent): void;
stopDrag(ev: MouseEvent): void;
onScroll(): void;
ngOnInit(): void;
scroll(scrollOffset: number): void;
ngOnDestroy(): void;
private setBoxShadowClass;
private switchClass;
private setBackgroundShadow;
static ɵfac: i0.ɵɵFactoryDeclaration<ScrollDragDirective, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<ScrollDragDirective, "[ngxScrollDrag]", never, { "scrollDirection": { "alias": "scrollDirection"; "required": false; }; "scrollShadow": { "alias": "scrollShadow"; "required": false; }; "backgroundColor": { "alias": "backgroundColor"; "required": false; }; "disableDrag": { "alias": "disableDrag"; "required": false; }; "ngxScrollDrag": { "alias": "ngxScrollDrag"; "required": false; }; }, { "shadowChange": "shadowChange"; }, never, never, false, never>;
}
export {};