UNPKG

ngx-parallax-scroll

Version:

This is a simple angular plugin, that allows us to implement parallax effect for some element in page

44 lines (43 loc) 1.95 kB
import { ElementRef, Renderer2, OnInit, AfterViewInit, OnChanges, SimpleChanges, OnDestroy } from '@angular/core'; import { Subscription } from 'rxjs'; import { ParallaxDirection } from './ngx-parallax.interfaces'; export declare class ParallaxScrollDirective implements OnInit, OnChanges, AfterViewInit, OnDestroy { elem: ElementRef; renderer: Renderer2; private platformId; private config?; parallaxSpeed: number; parallaxSmoothness: number; parallaxDirection?: ParallaxDirection; parallaxTimingFunction?: string; parallaxThrottleTime?: number; private _parallaxSpeedVal; private _parallaxSmoothnessVal; private _parallaxTimingFunVal; private _parallaxThrottleTime; scrollSubscribtion: Subscription; isPrxElInViewport: boolean; directiveName: string; constructor(elem: ElementRef, renderer: Renderer2, platformId: Object); ngOnInit(): void; ngOnChanges(changes: SimpleChanges): void; ngAfterViewInit(): void; ngOnDestroy(): void; initParallax(): void; setParallaxElTransform(): void; setParallaxTransition(): void; setParallaxSpeed(speedVal: any): void; setParallaxSmoothness(smoothnessVal: any): void; setParallaxDirection(directionVal: any): void; setParallaxTimingFun(timingFun: any): void; setParallaxThrottleTime(throttleTime: any): void; readonly prlxSpeed: number; readonly prlxSmoothness: number; readonly prlxTimingFun: string; readonly prlxThrottleTime: number; isProvided(value: any, propName: string): boolean; isTypeOf(value: any, requiredType: 'string' | 'number' | 'boolean', propName: string): boolean; isPositive(value: number, propName: string): boolean; validateParallaxSpeed(value: any, propName: string, requiredType: 'string' | 'number' | 'boolean'): boolean; validateParallaxSmoothness(value: any, propName: string, requiredType: 'string' | 'number' | 'boolean'): boolean; }