js: Add _ref property in view,store ref, for combine action in mobx
This commit is contained in:
parent
b496be1e6e
commit
d9c376f772
@ -425,6 +425,7 @@ var View = /** @class */ (function () {
|
||||
Object.defineProperty(View.prototype, "ref", {
|
||||
set: function (ref) {
|
||||
ref.current = this;
|
||||
this._ref = ref;
|
||||
},
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
|
@ -345,6 +345,7 @@ class View {
|
||||
}
|
||||
set ref(ref) {
|
||||
ref.current = this;
|
||||
this._ref = ref;
|
||||
}
|
||||
doAnimation(context, animation) {
|
||||
return this.nativeChannel(context, "doAnimation")(animation.toModel()).then((args) => {
|
||||
|
@ -1875,6 +1875,7 @@ class View {
|
||||
}
|
||||
set ref(ref) {
|
||||
ref.current = this;
|
||||
this._ref = ref;
|
||||
}
|
||||
doAnimation(context, animation) {
|
||||
return this.nativeChannel(context, "doAnimation")(animation.toModel()).then((args) => {
|
||||
|
1
doric-js/index.d.ts
vendored
1
doric-js/index.d.ts
vendored
@ -648,6 +648,7 @@ declare module "doric" {
|
||||
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>;
|
||||
|
1
doric-js/lib/src/ui/view.d.ts
vendored
1
doric-js/lib/src/ui/view.d.ts
vendored
@ -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>;
|
||||
|
@ -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) => {
|
||||
|
@ -373,8 +373,11 @@ export abstract class View implements Modeling {
|
||||
this.in(v)
|
||||
}
|
||||
|
||||
private _ref?: Ref<this>;
|
||||
|
||||
set ref(ref: Ref<this>) {
|
||||
ref.current = this
|
||||
this._ref = ref;
|
||||
}
|
||||
|
||||
doAnimation(context: BridgeContext, animation: IAnimation) {
|
||||
|
@ -382,8 +382,11 @@ export abstract class View implements Modeling {
|
||||
this.in(v)
|
||||
}
|
||||
|
||||
private _ref?: Ref<this>;
|
||||
|
||||
set ref(ref: Ref<this>) {
|
||||
ref.current = this
|
||||
this._ref = ref;
|
||||
}
|
||||
|
||||
doAnimation(context: BridgeContext, animation: IAnimation) {
|
||||
|
Reference in New Issue
Block a user