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

@@ -367,6 +367,12 @@ var View = /** @class */ (function () {
View.prototype.getHeight = function (context) {
return this.nativeChannel(context, 'getHeight')();
};
View.prototype.getX = function (context) {
return this.nativeChannel(context, 'getX')();
};
View.prototype.getY = function (context) {
return this.nativeChannel(context, 'getY')();
};
View.prototype.getLocationOnScreen = function (context) {
return this.nativeChannel(context, "getLocationOnScreen")();
};

View File

@@ -283,6 +283,12 @@ 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")();
}

View File

@@ -1742,6 +1742,12 @@ 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")();
}

2
doric-js/index.d.ts vendored
View File

@@ -241,6 +241,8 @@ declare module 'doric/lib/src/ui/view' {
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

@@ -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")();
}