在javascript事件中替换touchmove
。
使用touchmove
后,我会收到如下警告。
'Touch.webkitRadiusX' is deprecated and will be removed in M47, around November 2015. Please use 'Touch.radiusX' instead.
ionic.js:1155 'Touch.webkitRadiusY' is deprecated and will be removed in M47, around November 2015. Please use 'Touch.radiusY' instead.
ionic.js:1155 'Touch.webkitRotationAngle' is deprecated and will be removed in M47, around November 2015. Please use 'Touch.rotationAngle' instead.
ionic.js:1155 'Touch.webkitForce' is deprecated and will be removed in M47, around November 2015. Please use 'Touch.force' instead.
请帮助。
答案 0 :(得分:0)
您可以使用内置的Ionic Gesture来跟踪各种触摸事件,例如:hold
,tap
,doubletap
,drag
,dragstart
,{ {1}},dragend
,dragup
,dragdown
,dragleft
,dragright
,swipe
,swipeup
,{{1 }},swipedown
,swipeleft
,swiperight
,transform
,transformstart
,transformend
,rotate
,pinch
,
pinchin
,pinchout
。
在您的情况下,我认为touch
可以替换为release
事件。此事件会为您返回x,y。
这是使用方法:
在您的控制器中:注入touchmove
依赖项。
drag
的更多详情