Commit 5970a95d authored by hbcui1984's avatar hbcui1984

处理侧滑菜单及右滑关闭的灵敏度

parent 60d0c873
...@@ -1591,7 +1591,7 @@ var mui = (function(document, undefined) { ...@@ -1591,7 +1591,7 @@ var mui = (function(document, undefined) {
}); });
window.addEventListener('swiperight', function(e) { window.addEventListener('swiperight', function(e) {
var detail = e.detail; var detail = e.detail;
if ($.options.swipeBack === true && Math.abs(detail.angle)< 6) { if ($.options.swipeBack === true && Math.abs(detail.angle)< 3) {
$.back(); $.back();
} }
}); });
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -128,7 +128,11 @@ ...@@ -128,7 +128,11 @@
//点击“关闭侧滑菜单”按钮处理逻辑 //点击“关闭侧滑菜单”按钮处理逻辑
document.getElementById("close-btn").addEventListener("tap",close) document.getElementById("close-btn").addEventListener("tap",close)
//监听左滑事件,若菜单已展开,左滑要关闭菜单; //监听左滑事件,若菜单已展开,左滑要关闭菜单;
window.addEventListener("swipeleft",close); window.addEventListener("swipeleft",function (e) {
if(Math.abs(e.detail.angle)>170){
close();
}
});
</script> </script>
</body> </body>
......
(function($) { (function($) {
//TODO 临时屏蔽右滑关闭,等识别更精确后再放开;
//全局配置(通常所有页面引用该配置,特殊页面使用mui.init({})来覆盖全局配置) //全局配置(通常所有页面引用该配置,特殊页面使用mui.init({})来覆盖全局配置)
// $.initGlobal({ $.initGlobal({
// swipeBack: true swipeBack: true
// }); });
var back = $.back; var back = $.back;
$.back = function() { $.back = function() {
var current = plus.webview.currentWebview(); var current = plus.webview.currentWebview();
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment