Reuse declutter tree for hit detection
Replaying for hit detection no longer declutters, but uses the declutter tree from the previous rendered frame.
This commit is contained in:
@@ -152,12 +152,13 @@ ol.source.ImageVector.prototype.canvasFunctionInternal_ = function(extent, resol
|
||||
this.canvasContext_.clearRect(0, 0, size[0], size[1]);
|
||||
}
|
||||
|
||||
this.declutterTree_.clear();
|
||||
|
||||
var transform = this.getTransform_(ol.extent.getCenter(extent),
|
||||
resolution, pixelRatio, size);
|
||||
replayGroup.replay(this.canvasContext_, transform, 0, {});
|
||||
|
||||
this.replayGroup_ = replayGroup;
|
||||
this.declutterTree_.clear();
|
||||
|
||||
return this.canvasContext_.canvas;
|
||||
};
|
||||
@@ -186,7 +187,6 @@ ol.source.ImageVector.prototype.forEachFeatureAtCoordinate = function(
|
||||
return callback(feature);
|
||||
}
|
||||
}, null);
|
||||
this.declutterTree_.clear();
|
||||
return result;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user