This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
Doric/doric-js/lib/src/widget/flexScroller.d.ts
2020-04-11 13:02:16 +08:00

32 lines
868 B
TypeScript

import { View, IView, Group } from '../ui/view';
import { BridgeContext } from '../runtime/global';
export declare function flexScroller(views: View[], config?: IFlexScroller): FlexScroller;
export interface IFlexScroller extends IView {
contentOffset?: {
x: number;
y: number;
};
}
export declare class FlexScroller extends Group implements IFlexScroller {
contentOffset?: {
x: number;
y: number;
};
onScroll?: (offset: {
x: number;
y: number;
}) => void;
onScrollEnd?: (offset: {
x: number;
y: number;
}) => void;
scrollTo(context: BridgeContext, offset: {
x: number;
y: number;
}, animated?: boolean): Promise<any>;
scrollBy(context: BridgeContext, offset: {
x: number;
y: number;
}, animated?: boolean): Promise<any>;
}