js: Add _ref property in view,store ref, for combine action in mobx

This commit is contained in:
pengfei.zhou
2022-09-17 03:51:08 +08:00
committed by osborn
parent b496be1e6e
commit d9c376f772
8 changed files with 12 additions and 0 deletions

View File

@@ -135,6 +135,7 @@ export declare abstract class View implements Modeling {
flexConfig?: FlexConfig;
set props(props: Partial<this>);
set parent(v: Group);
private _ref?;
set ref(ref: Ref<this>);
doAnimation(context: BridgeContext, animation: IAnimation): Promise<void>;
clearAnimation(context: BridgeContext, animation: IAnimation): Promise<void>;

View File

@@ -227,6 +227,7 @@ export class View {
}
set ref(ref) {
ref.current = this;
this._ref = ref;
}
doAnimation(context, animation) {
return this.nativeChannel(context, "doAnimation")(animation.toModel()).then((args) => {