UNPKG

2.75 kBPlain TextView Raw
1import { Behavior } from './scroller/Behavior'
2import Actions from './scroller/Actions'
3import { ExposedAPI as ExposedAPIByScroller } from './scroller/Scroller'
4import { Animater } from './animater'
5import { ExposedAPI as ExposedAPIByAnimater } from './animater/Base'
6
7export interface BScrollInstance
8 extends ExposedAPIByScroller,
9 ExposedAPIByAnimater {
10 [key: string]: any
11 x: Behavior['currentPos']
12 y: Behavior['currentPos']
13 hasHorizontalScroll: Behavior['hasScroll']
14 hasVerticalScroll: Behavior['hasScroll']
15 scrollerWidth: Behavior['contentSize']
16 scrollerHeight: Behavior['contentSize']
17 maxScrollX: Behavior['maxScrollPos']
18 maxScrollY: Behavior['maxScrollPos']
19 minScrollX: Behavior['minScrollPos']
20 minScrollY: Behavior['minScrollPos']
21 movingDirectionX: Behavior['movingDirection']
22 movingDirectionY: Behavior['movingDirection']
23 directionX: Behavior['direction']
24 directionY: Behavior['direction']
25 enabled: Actions['enabled']
26 pending: Animater['pending']
27}
28
29export const propertiesConfig = [
30 {
31 sourceKey: 'scroller.scrollBehaviorX.currentPos',
32 key: 'x'
33 },
34 {
35 sourceKey: 'scroller.scrollBehaviorY.currentPos',
36 key: 'y'
37 },
38 {
39 sourceKey: 'scroller.scrollBehaviorX.hasScroll',
40 key: 'hasHorizontalScroll'
41 },
42 {
43 sourceKey: 'scroller.scrollBehaviorY.hasScroll',
44 key: 'hasVerticalScroll'
45 },
46 {
47 sourceKey: 'scroller.scrollBehaviorX.contentSize',
48 key: 'scrollerWidth'
49 },
50 {
51 sourceKey: 'scroller.scrollBehaviorY.contentSize',
52 key: 'scrollerHeight'
53 },
54 {
55 sourceKey: 'scroller.scrollBehaviorX.maxScrollPos',
56 key: 'maxScrollX'
57 },
58 {
59 sourceKey: 'scroller.scrollBehaviorY.maxScrollPos',
60 key: 'maxScrollY'
61 },
62 {
63 sourceKey: 'scroller.scrollBehaviorX.minScrollPos',
64 key: 'minScrollX'
65 },
66 {
67 sourceKey: 'scroller.scrollBehaviorY.minScrollPos',
68 key: 'minScrollY'
69 },
70 {
71 sourceKey: 'scroller.scrollBehaviorX.movingDirection',
72 key: 'movingDirectionX'
73 },
74 {
75 sourceKey: 'scroller.scrollBehaviorY.movingDirection',
76 key: 'movingDirectionY'
77 },
78 {
79 sourceKey: 'scroller.scrollBehaviorX.direction',
80 key: 'directionX'
81 },
82 {
83 sourceKey: 'scroller.scrollBehaviorY.direction',
84 key: 'directionY'
85 },
86 {
87 sourceKey: 'scroller.actions.enabled',
88 key: 'enabled'
89 },
90 {
91 sourceKey: 'scroller.animater.pending',
92 key: 'pending'
93 },
94 {
95 sourceKey: 'scroller.animater.stop',
96 key: 'stop'
97 },
98 {
99 sourceKey: 'scroller.scrollTo',
100 key: 'scrollTo'
101 },
102 {
103 sourceKey: 'scroller.scrollBy',
104 key: 'scrollBy'
105 },
106 {
107 sourceKey: 'scroller.scrollToElement',
108 key: 'scrollToElement'
109 },
110 {
111 sourceKey: 'scroller.resetPosition',
112 key: 'resetPosition'
113 }
114]