From 5601dfd0ca496283bd31fccb1c9aa68cef21faf9 Mon Sep 17 00:00:00 2001 From: "pengfei.zhou" Date: Thu, 12 Dec 2019 17:31:09 +0800 Subject: [PATCH] feat:add getLocationOnScreen --- src/ui/view.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ui/view.ts b/src/ui/view.ts index b524773a..3ed26ffa 100644 --- a/src/ui/view.ts +++ b/src/ui/view.ts @@ -297,6 +297,10 @@ export abstract class View implements Modeling, IView { return this.nativeChannel(context, 'getHeight')() as Promise } + getLocationOnScreen(context: BridgeContext) { + return this.nativeChannel(context, "getLocationOnScreen")() as Promise<{ x: number, y: number }> + } + /**++++++++++transform++++++++++*/ @Property translationX?: number