feat: Image add isAnimating, startAnimating and stopAnimating API
This commit is contained in:
4
doric-js/lib/src/widget/image.d.ts
vendored
4
doric-js/lib/src/widget/image.d.ts
vendored
@@ -1,5 +1,6 @@
|
||||
import { View } from "../ui/view";
|
||||
import { Color } from "../util/color";
|
||||
import { BridgeContext } from "../runtime/global";
|
||||
export declare enum ScaleType {
|
||||
ScaleToFill = 0,
|
||||
ScaleAspectFit = 1,
|
||||
@@ -68,5 +69,8 @@ export declare class Image extends View {
|
||||
right: number;
|
||||
bottom: number;
|
||||
};
|
||||
isAnimating(context: BridgeContext): Promise<boolean>;
|
||||
startAnimating(context: BridgeContext): Promise<any>;
|
||||
stopAnimating(context: BridgeContext): Promise<any>;
|
||||
}
|
||||
export declare function image(config: Partial<Image>): Image;
|
||||
|
@@ -32,6 +32,15 @@ export var ScaleType;
|
||||
ScaleType[ScaleType["ScaleAspectFill"] = 2] = "ScaleAspectFill";
|
||||
})(ScaleType || (ScaleType = {}));
|
||||
export class Image extends View {
|
||||
isAnimating(context) {
|
||||
return this.nativeChannel(context, "isAnimating")();
|
||||
}
|
||||
startAnimating(context) {
|
||||
return this.nativeChannel(context, "startAnimating")();
|
||||
}
|
||||
stopAnimating(context) {
|
||||
return this.nativeChannel(context, "stopAnimating")();
|
||||
}
|
||||
}
|
||||
__decorate([
|
||||
Property,
|
||||
|
Reference in New Issue
Block a user