Skip to content

Commit

Permalink
fix VectorLayer render Performance issues
Browse files Browse the repository at this point in the history
  • Loading branch information
deyihu committed Oct 29, 2024
1 parent 59608ba commit 40e359d
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions src/renderer/layer/vectorlayer/VectorLayerCanvasRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,19 +70,9 @@ class VectorLayerRenderer extends OverlayLayerCanvasRenderer {
setToRedraw(): this {
super.setToRedraw();
this._resetProgressiveRender();
this._resetGeosCollisionState();
return this;
}

_resetGeosCollisionState() {
const geos = this.layer._geoList || [];
for (let i = 0, len = geos.length; i < len; i++) {
const geo = geos[i];
if (geo.isPoint) {
geo._collided = false;
}
}
}

//@internal
_geoIsCollision(geo: GeoType, collisionIndex: any) {
Expand All @@ -91,10 +81,14 @@ class VectorLayerRenderer extends OverlayLayerCanvasRenderer {
}
const collision = geo.options.collision;
if (!collision) {
if (geo.isPoint) {
geo._collided = false;
}
return false;
}
// const type = geo.getType();
if (geo.isPoint && geo.getContainerExtent) {
geo._collided = false;
if (!geo.bbox) {
geo.bbox = [0, 0, 0, 0];
}
Expand Down

0 comments on commit 40e359d

Please sign in to comment.