nativescript - 获取元素当前位置?
问题描述
有没有办法获取元素的当前位置?它是 x 和 y。我试过了getLocationOnScreen
,getLocationInWindow
但结果是不确定的。
解决方案
我认为getLocationOnScreen
andgetLocationInWindow
应该是对象,getLocationOnScreen().x
否则.y
会好的。
推荐阅读
- python - 如何在 python shell 脚本中使用最后执行的命令的返回码
- sql-server - 在外键列上创建对齐索引
- spring - Jackson JsonMappingException 导致的异常 - 必须是接口
- python - 如何解决投资组合优化的方程和约束系统?
- bash - 在 bash 脚本中使用循环在不同的目录中 cat 多个文件 file1 file2 file3 ....file100
- reactjs - npm start not working in react 给出错误 npm update check failed
- vector - 笛卡尔平面上沿指定向量的两个圆之间的最小距离
- sql - 我加入了几个表,并且在查询结束时需要最后一列的总数
- python-3.x - Python - 在解决“将 R 数据集 mtcars 加载为 pandas 数据框”时需要帮助。问题
- python - 您如何搜索一列并用您找到的内容填充另一列?