From 0ebc7e432fc3491c3648b8d4c429ebf8b21b2090 Mon Sep 17 00:00:00 2001 From: libccy Date: Wed, 5 Apr 2017 12:47:19 +0800 Subject: [PATCH] f --- game/game.js | 83 +++++++++++++++++++++------------------------------- 1 file changed, 33 insertions(+), 50 deletions(-) diff --git a/game/game.js b/game/game.js index 3ee4bb1dd..e874998a2 100644 --- a/game/game.js +++ b/game/game.js @@ -273,6 +273,17 @@ intro:'回合开始时使手机震动', init:false }, + pressure_click:{ + name:'按压功能', + init:'auto', + intro:'在空白区域点击按压时的操作', + unfrequent:true, + item:{ + pause:'暂停', + config:'选项', + auto:'托管', + } + }, right_click:{ name:'右键功能', init:'pause', @@ -6250,35 +6261,6 @@ }); } } - // lib.cardSelectObserver=new MutationObserver(function(mutations){ - // for(var i=0;i=this.scrollHeight){ - // this.scrollTop=this.scrollHeight-this.offsetHeight-1; - // } - // } }, dialogtouchStart:function(e){ ui.click.touchStart.call(this,e); @@ -37584,15 +37561,8 @@ e.preventDefault(); } else{ - if(lib.device=='ios'&& - this.scrollWidth<=this.offsetWidth+5&& - this.scrollHeight<=this.offsetHeight+5){ - e.preventDefault(); - } - else{ - delete _status._swipeorigin; - e.stopPropagation(); - } + delete _status._swipeorigin; + e.stopPropagation(); } }, autoskill:function(bool,node){ @@ -37617,7 +37587,20 @@ ui.click.touchpop(); e.stopPropagation(); }, - rightpressure(force, event){ + pressurepause:function(force,event){ + if(!_status.force&&!_status.mousedragging&&force>=0.5){ + _status.force=true; + switch(lib.config.pressure_click){ + case 'pause':ui.click.pause();break; + case 'auto':ui.click.auto();break; + case 'config':ui.click.config();break; + } + } + }, + rightpressure:function(force, event){ + if(force>0){ + _status.force=true; + } if(force>=0.5){ if(_status.mousedragging){ _status.mousedragging=null;