首页 > 解决方案 > 获取元素当前位置?

问题描述

有没有办法获取元素的当前位置?它是 x 和 y。我试过了getLocationOnScreengetLocationInWindow但结果是不确定的。

标签: nativescriptnativescript-angular

解决方案


我认为getLocationOnScreenandgetLocationInWindow应该是对象,getLocationOnScreen().x 否则.y 会好的。


推荐阅读