-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtype.d.ts
69 lines (65 loc) · 1.75 KB
/
type.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
declare module "locomotive-scroll" {
export interface ILenisScrollToOptions {
behavior?: "auto" | "smooth";
top?: number;
left?: number;
}
export interface ILocomotiveScrollOptions {
lenisOptions?: any;
modularInstance?: any;
triggerRootMargin?: string;
rafRootMargin?: string;
autoResize?: boolean;
autoStart?: boolean;
scrollCallback?: () => void;
initCustomTicker?: () => void;
destroyCustomTicker?: () => void;
}
export type lenisTargetScrollTo = any;
export default class LocomotiveScroll {
rafPlaying: boolean;
private lenisInstance;
private coreInstance;
private lenisOptions;
private modularInstance?;
private triggerRootMargin?;
private rafRootMargin?;
private rafInstance?;
private autoResize?;
private autoStart?;
private ROInstance?;
private scrollCallback;
private initCustomTicker?;
private destroyCustomTicker?;
private _onRenderBind;
private _onResizeBind;
private _onScrollToBind;
constructor({
lenisOptions,
modularInstance,
triggerRootMargin,
rafRootMargin,
autoResize,
autoStart,
scrollCallback,
initCustomTicker,
destroyCustomTicker,
}?: ILocomotiveScrollOptions);
private _init;
destroy(): void;
private _bindEvents;
private _unbindEvents;
private _bindScrollToEvents;
private _unbindScrollToEvents;
private _onResize;
private _onRender;
private _onScrollTo;
start(): void;
stop(): void;
removeScrollElements($oldContainer: HTMLElement): void;
addScrollElements($newContainer: HTMLElement): void;
resize(): void;
scrollTo(target: lenisTargetScrollTo, options?: ILenisScrollToOptions): void;
private _raf;
}
}