Commit 5970a95d authored by hbcui1984's avatar hbcui1984

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

parent 60d0c873
......@@ -1591,7 +1591,7 @@ var mui = (function(document, undefined) {
});
window.addEventListener('swiperight', function(e) {
var detail = e.detail;
if ($.options.swipeBack === true && Math.abs(detail.angle)< 6) {
if ($.options.swipeBack === true && Math.abs(detail.angle)< 3) {
$.back();
}
});
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -128,7 +128,11 @@
//点击“关闭侧滑菜单”按钮处理逻辑
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>
</body>
......
(function($) {
//TODO 临时屏蔽右滑关闭,等识别更精确后再放开;
//全局配置(通常所有页面引用该配置,特殊页面使用mui.init({})来覆盖全局配置)
// $.initGlobal({
// swipeBack: true
// });
$.initGlobal({
swipeBack: true
});
var back = $.back;
$.back = function() {
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