fix: 修复一些问题 (#1149)

* fix: 完善 hammerjs 事件的解除监听

* fix: 在事件节流中排除 dblclick

* fix: polygon 采用双面渲染
This commit is contained in:
YiQianYao 2022-06-15 11:18:31 +08:00 committed by GitHub
parent 818e0ac8a1
commit a18c742d2c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 2 additions and 10 deletions

View File

@ -120,7 +120,7 @@ export default class InteractionService extends EventEmitter
const $containter = this.mapService.getMapContainer();
if ($containter) {
$containter.removeEventListener('mousemove', this.onHover);
// this.hammertime.off('dblclick click', this.onHammer);
this.hammertime.off('dblclick click', this.onHammer);
this.hammertime.off('panstart panmove panend pancancel', this.onDrag);
// $containter.removeEventListener('touchstart', this.onTouch);
// $containter.removeEventListener('click', this.onHover);

View File

@ -213,7 +213,7 @@ export default class PickingService implements IPickingService {
// TODO: 优化拾取操作 在右键时 mousedown 和 contextmenu 几乎同时触发,所以不能舍去这一次的触发
if (
t - this.lastPickTime > 10 ||
['contextmenu', 'click', 'mouseup'].includes(target.type)
['contextmenu', 'click', 'dblclick', 'mouseup'].includes(target.type)
) {
await this.pickingLayers(target);
}

View File

@ -113,10 +113,6 @@ export default class ExtrudeModel extends BaseModel {
fragmentShader: frag,
triangulation: PolygonExtrudeTriangulation,
stencil: getMask(mask, maskInside),
cull: {
enable: true,
face: gl.BACK, // gl.FRONT | gl.BACK;
},
}),
];
}

View File

@ -88,10 +88,6 @@ export default class FillModel extends BaseModel {
triangulation,
blend: this.getBlend(),
depth: { enable: false },
cull: {
enable: true,
face: gl.BACK, // gl.FRONT | gl.BACK;
},
stencil: getMask(mask, maskInside),
}),
];