You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.
问题描述
使用CSS中的transition加transform配置视图的过场动画,由点击事件触发修改视图的class,进而触发过场动画效果。
动画效果在Web端和Android端处理正常,位移结果与预期一致,但在iOS端动画处理完成后位移的结果与预期值相比要多位移2个像素点。
问题重现
下面是SwitchRadio.vue的代码:
环境信息
屏幕截图
在Web端位移正常:
![Web](https://user-images.githubusercontent.com/15970290/56496679-f252f480-652c-11e9-9da5-82cb4843721a.png)
在iOS端位移多出大概2个像素点:
![iOS](https://user-images.githubusercontent.com/15970290/56496692-0d256900-652d-11e9-9656-fc0de7a1b934.png)
经调试定位后,确认问题点出在动画逐帧模拟时的精度处理及计算逻辑问题。图中per的值应从0到1进行逐帧模拟,最后一帧务必为1,但这段代码由于精度处理及计算逻辑问题,导致最后一帧可能会小于或大于1,从而影响最终位移的计算结果。下面是处理最后一帧动画时断点位置,图中显示per的值大于1:
![Code](https://user-images.githubusercontent.com/15970290/56496874-d2700080-652d-11e9-920a-a18c0973a03e.png)
The text was updated successfully, but these errors were encountered: