UNPKG

2.69 kBTypeScriptView Raw
1// Type definitions for jQuery.slimScroll v1.3.8
2// Project: https://github.com/rochal/jQuery-slimScroll
3// Definitions by: Chintan Shah <https://github.com/Promact>
4// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
5// TypeScript Version: 2.3
6/// <reference types="jquery"/>
7
8interface IJQuerySlimScrollOptions {
9 /**
10 * width in pixels of the visible scroll area
11 */
12 width? :string;
13 /**
14 * height in pixels of the visible scroll area
15 */
16 height? :string;
17 /**
18 * width in pixels of the scrollbar and rail
19 */
20 size? :string;
21 /**
22 * scrollbar color, accepts any hex/color value
23 */
24 color?:string;
25 /**
26 * scrollbar position - left/right
27 */
28 position?:string;
29 /**
30 * distance in pixels between the side edge and the scrollbar
31 */
32 distance?:string;
33 /**
34 * default scroll position on load - top / bottom / $('selector')
35 */
36 start?:any;
37 /**
38 * sets scrollbar opacity
39 */
40 opacity? :number;
41 /**
42 * enables always-on mode for the scrollbar
43 */
44 alwaysVisible?: boolean;
45 /**
46 * check if we should hide the scrollbar when user is hovering over
47 */
48 disableFadeOut?: boolean;
49 /**
50 * sets visibility of the rail
51 */
52 railVisible?: boolean;
53 /**
54 * sets rail color
55 */
56 railColor?: string;
57 /**
58 * sets rail opacity
59 */
60 railOpacity?:number;
61 /**
62 * whether we should use jQuery UI Draggable to enable bar dragging
63 */
64 railDraggable?: boolean;
65 /**
66 * default CSS class of the slimscroll rail
67 */
68 railClass?: string;
69 /**
70 * default CSS class of the slimscroll bar
71 */
72 barClass?: string;
73 /**
74 * default CSS class of the slimscroll wrapper
75 */
76 wrapperClass?: string;
77 /**
78 * check if mousewheel should scroll the window if we reach top/bottom
79 */
80 allowPageScroll?: boolean;
81 /**
82 * scroll amount applied to each mouse wheel step
83 */
84 wheelStep?: number;
85 /**
86 * scroll amount applied when user is using gestures
87 */
88 touchScrollStep?: number;
89 /**
90 * sets border radius
91 */
92 borderRadius?: string;
93 /**
94 * sets border radius of the rail
95 */
96 railBorderRadius?: string;
97 /**
98 * jumps to the specified scroll value
99 */
100 scrollTo?: string;
101 /**
102 * increases/decreases current scroll value by specified amount
103 */
104 scrollBy?: string;
105 /**
106 * release resources held by the plugin
107 */
108 destroy?:boolean;
109}
110
111interface JQuery {
112 slimScroll:{
113 (): JQuery;
114 (options:IJQuerySlimScrollOptions): JQuery;
115 }
116}
117