feat:optimize iOS Transform setting

This commit is contained in:
pengfei.zhou
2020-03-03 14:43:49 +08:00
committed by osborn
parent 35e9f05114
commit 0fa121e54f
10 changed files with 42 additions and 5 deletions

View File

@@ -134,6 +134,8 @@ export declare abstract class View implements Modeling, IView {
nativeChannel(context: BridgeContext, name: string): (args?: any) => Promise<any>;
getWidth(context: BridgeContext): Promise<number>;
getHeight(context: BridgeContext): Promise<number>;
getX(context: BridgeContext): Promise<number>;
getY(context: BridgeContext): Promise<number>;
getLocationOnScreen(context: BridgeContext): Promise<{
x: number;
y: number;

View File

@@ -168,6 +168,12 @@ export class View {
getHeight(context) {
return this.nativeChannel(context, 'getHeight')();
}
getX(context) {
return this.nativeChannel(context, 'getX')();
}
getY(context) {
return this.nativeChannel(context, 'getY')();
}
getLocationOnScreen(context) {
return this.nativeChannel(context, "getLocationOnScreen")();
}