mirror of https://gitee.com/antv-l7/antv-l7
feat: 优化代码,使用 Array.includes 代替 || (#1115)
* fix: 修复 mouseup 失效 * feat: 优化 pickingService 的节流操作 * style: lint style
This commit is contained in:
parent
db1940be1f
commit
29d7715000
|
@ -213,9 +213,7 @@ export default class PickingService implements IPickingService {
|
|||
// TODO: 优化拾取操作 在右键时 mousedown 和 contextmenu 几乎同时触发,所以不能舍去这一次的触发
|
||||
if (
|
||||
t - this.lastPickTime > 10 ||
|
||||
target.type === 'contextmenu' ||
|
||||
target.type === 'click' ||
|
||||
target.type === 'mouseup'
|
||||
['contextmenu', 'click', 'mouseup'].includes(target.type)
|
||||
) {
|
||||
await this.pickingLayers(target);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue