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/scroller.d.ts
2020-03-03 16:37:40 +08:00

28 lines
804 B
TypeScript

import { Superview, View, IView, NativeViewModel } from '../ui/view';
import { BridgeContext } from '../runtime/global';
export declare function scroller(content: View, config?: IScroller): Scroller;
export interface IScroller extends IView {
content?: View;
contentOffset?: {
x: number;
y: number;
};
}
export declare class Scroller extends Superview implements IScroller {
content: View;
contentOffset?: {
x: number;
y: number;
};
allSubviews(): View[];
toModel(): NativeViewModel;
scrollTo(context: BridgeContext, offset: {
x: number;
y: number;
}, animated?: boolean): Promise<any>;
scrollBy(context: BridgeContext, offset: {
x: number;
y: number;
}, animated?: boolean): Promise<any>;
}