Clouda-team / Cloudajs

Clouda Framework - A Realtime Javascript RIA Framework For Mobile WebApp
899 stars 403 forks source link

touchjs的touch.config的使用问题 #99

Closed hisaspirations closed 9 years ago

hisaspirations commented 9 years ago

touch.config({ tap: false, //tap类事件开关, 默认为true doubleTap: false, //doubleTap事件开关, 默认为true hold: false, //hold事件开关, 默认为true // holdTime: 650, //hold时间长度 swipe: true, //swipe事件开关 swipeTime: 100, //触发swipe事件的最大时长 swipeMinDistance: 5, //swipe移动最小距离 swipeFactor: 10, //加速因子, 值越大变化速率越快 drag: false, //drag事件开关 pinch: false //pinch类事件开关 }); 这样写有错吗?应该怎样写?

huang-xin commented 9 years ago

如果你用了 jquery的话,这样:

$.extend(touch.config, {
     doubleTap: false
});

想简单改变一两个 config改变默认:

touch.config.doubleTap = false;
touch.config. swipe = false;