js: add onAnimationEnd for image
This commit is contained in:
parent
e4b27af938
commit
e1b10b10bb
@ -2360,6 +2360,10 @@ var Image = /** @class */ (function (_super) {
|
||||
Property,
|
||||
__metadata$b("design:type", Object)
|
||||
], Image.prototype, "stretchInset", void 0);
|
||||
__decorate$b([
|
||||
Property,
|
||||
__metadata$b("design:type", Function)
|
||||
], Image.prototype, "onAnimationEnd", void 0);
|
||||
return Image;
|
||||
}(View));
|
||||
function image(config) {
|
||||
|
@ -1778,6 +1778,10 @@ __decorate$b([
|
||||
Property,
|
||||
__metadata$b("design:type", Object)
|
||||
], Image.prototype, "stretchInset", void 0);
|
||||
__decorate$b([
|
||||
Property,
|
||||
__metadata$b("design:type", Function)
|
||||
], Image.prototype, "onAnimationEnd", void 0);
|
||||
function image(config) {
|
||||
const ret = new Image;
|
||||
ret.layoutConfig = layoutConfig().fit();
|
||||
|
@ -3306,6 +3306,10 @@ __decorate$b([
|
||||
Property,
|
||||
__metadata$b("design:type", Object)
|
||||
], Image.prototype, "stretchInset", void 0);
|
||||
__decorate$b([
|
||||
Property,
|
||||
__metadata$b("design:type", Function)
|
||||
], Image.prototype, "onAnimationEnd", void 0);
|
||||
function image(config) {
|
||||
const ret = new Image;
|
||||
ret.layoutConfig = layoutConfig().fit();
|
||||
|
4
doric-js/index.d.ts
vendored
4
doric-js/index.d.ts
vendored
@ -690,6 +690,10 @@ declare module 'doric/lib/src/widget/image' {
|
||||
right: number;
|
||||
bottom: number;
|
||||
};
|
||||
/**
|
||||
* Called if loaded image is animated and played end.
|
||||
*/
|
||||
onAnimationEnd?: () => void;
|
||||
isAnimating(context: BridgeContext): Promise<boolean>;
|
||||
startAnimating(context: BridgeContext): Promise<any>;
|
||||
stopAnimating(context: BridgeContext): Promise<any>;
|
||||
|
4
doric-js/lib/src/widget/image.d.ts
vendored
4
doric-js/lib/src/widget/image.d.ts
vendored
@ -74,6 +74,10 @@ export declare class Image extends View {
|
||||
right: number;
|
||||
bottom: number;
|
||||
};
|
||||
/**
|
||||
* Called if loaded image is animated and played end.
|
||||
*/
|
||||
onAnimationEnd?: () => void;
|
||||
isAnimating(context: BridgeContext): Promise<boolean>;
|
||||
startAnimating(context: BridgeContext): Promise<any>;
|
||||
stopAnimating(context: BridgeContext): Promise<any>;
|
||||
|
@ -116,6 +116,10 @@ __decorate([
|
||||
Property,
|
||||
__metadata("design:type", Object)
|
||||
], Image.prototype, "stretchInset", void 0);
|
||||
__decorate([
|
||||
Property,
|
||||
__metadata("design:type", Function)
|
||||
], Image.prototype, "onAnimationEnd", void 0);
|
||||
export function image(config) {
|
||||
const ret = new Image;
|
||||
ret.layoutConfig = layoutConfig().fit();
|
||||
|
@ -115,6 +115,12 @@ export class Image extends View {
|
||||
bottom: number
|
||||
}
|
||||
|
||||
/**
|
||||
* Called if loaded image is animated and played end.
|
||||
*/
|
||||
@Property
|
||||
onAnimationEnd?: () => void
|
||||
|
||||
isAnimating(context: BridgeContext) {
|
||||
return this.nativeChannel(context, "isAnimating")() as Promise<boolean>
|
||||
}
|
||||
|
4
doric-web/dist/index.js
vendored
4
doric-web/dist/index.js
vendored
@ -3380,6 +3380,10 @@ __decorate$b([
|
||||
Property,
|
||||
__metadata$b("design:type", Object)
|
||||
], Image.prototype, "stretchInset", void 0);
|
||||
__decorate$b([
|
||||
Property,
|
||||
__metadata$b("design:type", Function)
|
||||
], Image.prototype, "onAnimationEnd", void 0);
|
||||
function image(config) {
|
||||
const ret = new Image;
|
||||
ret.layoutConfig = layoutConfig().fit();
|
||||
|
2
doric-web/dist/index.js.map
vendored
2
doric-web/dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user