diff --git a/idea.md b/idea.md index 35e57d7..9e036cc 100644 --- a/idea.md +++ b/idea.md @@ -67,7 +67,7 @@ dam4.png ---- 存档 59 [] 宝物目标设定 [] 每个怪物加一个怪物说明 [] 歌词展示系统 -[] 小地图显示框,可以选择是否显示剩余怪物数量等 +[x] 小地图显示框,可以选择是否显示剩余怪物数量等 [x] 怪物死亡特效 [] 区域名称显示特效,3D 粒子特效 [x] 单独的工具栏,可以自定义按键 diff --git a/src/plugin/ui/fly.ts b/src/plugin/ui/fly.ts index a749ef9..d30c207 100644 --- a/src/plugin/ui/fly.ts +++ b/src/plugin/ui/fly.ts @@ -506,7 +506,7 @@ export class MinimapDrawer { y: number ) { if ( - this.scale * this.innerRatio > 10 && + this.scale * this.innerRatio > 2 && this.scale * this.innerRatio < 40 && !this.downloadMode && this.showInfo diff --git a/src/plugin/use.ts b/src/plugin/use.ts index eaf8677..b148aa7 100644 --- a/src/plugin/use.ts +++ b/src/plugin/use.ts @@ -30,7 +30,7 @@ checkMobile(); function checkMobile() { if (isMobile && !alerted) { alert( - '手机端建议使用自带的浏览器进行游玩,并在进入游戏后开启游戏内的全屏设置游玩' + '手机端建议使用新版APP或者自带的浏览器进行游玩,并在进入游戏后开启游戏内的全屏设置游玩' ); alerted = true; } @@ -39,7 +39,7 @@ function checkMobile() { /** * 向一个元素添加拖拽事件 * @param ele 目标元素,当为全局拖拽时,传入数组表示所有元素共用一个全局拖拽函数 - * @param fn 推拽时触发的函数,传入x y和鼠标事件或点击事件 + * @param fn 拖拽时触发的函数,传入x y和鼠标事件或点击事件 * @param ondown 鼠标按下时执行的函数 * @param global 是否全局拖拽,即拖拽后鼠标或手指离开元素后是否依然视为正在拖拽 */ @@ -66,6 +66,14 @@ export function useDrag( onup && onup(e); }; + const touchUp = (e: TouchEvent) => { + const ele = global ? document : e.target; + if (ele) { + (ele as HTMLElement).removeEventListener('touchmove', touchFn); + } + onup && onup(e); + }; + const md = (e: MouseEvent) => { const ele = global ? document : e.target; if (ele) { @@ -93,10 +101,6 @@ export function useDrag( const target = global ? document : ele; - const touchUp = (e: TouchEvent) => { - onup && onup(e); - }; - if (target instanceof Array) { target.forEach(v => { v.addEventListener('mouseup', mouseUp);