feat:scroller add scrollBy
This commit is contained in:
@@ -2016,6 +2016,9 @@ var Scroller = /** @class */ (function (_super) {
|
||||
Scroller.prototype.scrollTo = function (context, offset, animated) {
|
||||
return this.nativeChannel(context, "scrollTo")({ offset: offset, animated: animated });
|
||||
};
|
||||
Scroller.prototype.scrollBy = function (context, offset, animated) {
|
||||
return this.nativeChannel(context, "scrollBy")({ offset: offset, animated: animated });
|
||||
};
|
||||
__decorate$7([
|
||||
Property,
|
||||
__metadata$7("design:type", Object)
|
||||
|
||||
@@ -1496,6 +1496,9 @@ class Scroller extends Superview {
|
||||
scrollTo(context, offset, animated) {
|
||||
return this.nativeChannel(context, "scrollTo")({ offset, animated });
|
||||
}
|
||||
scrollBy(context, offset, animated) {
|
||||
return this.nativeChannel(context, "scrollBy")({ offset, animated });
|
||||
}
|
||||
}
|
||||
__decorate$7([
|
||||
Property,
|
||||
|
||||
@@ -2955,6 +2955,9 @@ class Scroller extends Superview {
|
||||
scrollTo(context, offset, animated) {
|
||||
return this.nativeChannel(context, "scrollTo")({ offset, animated });
|
||||
}
|
||||
scrollBy(context, offset, animated) {
|
||||
return this.nativeChannel(context, "scrollBy")({ offset, animated });
|
||||
}
|
||||
}
|
||||
__decorate$7([
|
||||
Property,
|
||||
|
||||
4
doric-js/index.d.ts
vendored
4
doric-js/index.d.ts
vendored
@@ -591,6 +591,10 @@ declare module 'doric/lib/src/widget/scroller' {
|
||||
x: number;
|
||||
y: number;
|
||||
}, animated?: boolean): Promise<any>;
|
||||
scrollBy(context: BridgeContext, offset: {
|
||||
x: number;
|
||||
y: number;
|
||||
}, animated?: boolean): Promise<any>;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
4
doric-js/lib/src/widget/scroller.d.ts
vendored
4
doric-js/lib/src/widget/scroller.d.ts
vendored
@@ -20,4 +20,8 @@ export declare class Scroller extends Superview implements IScroller {
|
||||
x: number;
|
||||
y: number;
|
||||
}, animated?: boolean): Promise<any>;
|
||||
scrollBy(context: BridgeContext, offset: {
|
||||
x: number;
|
||||
y: number;
|
||||
}, animated?: boolean): Promise<any>;
|
||||
}
|
||||
|
||||
@@ -46,6 +46,9 @@ export class Scroller extends Superview {
|
||||
scrollTo(context, offset, animated) {
|
||||
return this.nativeChannel(context, "scrollTo")({ offset, animated });
|
||||
}
|
||||
scrollBy(context, offset, animated) {
|
||||
return this.nativeChannel(context, "scrollBy")({ offset, animated });
|
||||
}
|
||||
}
|
||||
__decorate([
|
||||
Property,
|
||||
|
||||
@@ -52,4 +52,8 @@ export class Scroller extends Superview implements IScroller {
|
||||
scrollTo(context: BridgeContext, offset: { x: number, y: number }, animated?: boolean) {
|
||||
return this.nativeChannel(context, "scrollTo")({ offset, animated })
|
||||
}
|
||||
|
||||
scrollBy(context: BridgeContext, offset: { x: number, y: number }, animated?: boolean) {
|
||||
return this.nativeChannel(context, "scrollBy")({ offset, animated })
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user