1
在一個離子應用程序中,我正在觀看on-swipe-right
指令以實現「返回」功能。在Ionic/Android WebView中檢測多個觸摸
doctype html5
html(lang='en', ng-app='my-app')
head
meta(charset='utf-8')
meta(http-equiv='X-UA-Compatible', content='IE=edge,chrome=1')
meta(name='viewport', content='width=device-width,initial-scale=1')
//- snip
body(
ng-controller="DoloresMainCtrl"
on-swipe-right="toMainScreen($event)"
)
ion-nav-view
和Controller
angular.module('my-app', [
'ui.router'
])
.controller 'DoloresMainCtrl', ($scope, $state)->
$scope.toMainScreen = ($event)->
$state.go '^' if $event?.gesture?.touches?.length is 2
的事件觸發就好了,但$event.gesture.touches.length
總是1
。
我需要設置什麼來獲取離子來檢測多個接觸?
(約束:機器人4.4+,iOS的8+)
我也有興趣在這個問題的答案。 Ionic使用hammer.js的叉子來進行觸摸事件,而在hammer.js中,可以檢測多個觸摸,所以爲什麼不使用Ionic? – 2014-11-14 08:17:02