Do not do any canvas work when there are no features to render

This commit is contained in:
Andreas Hocevar
2021-09-21 11:21:01 +00:00
parent 0505d5d379
commit 46b21c2588
2 changed files with 2 additions and 9 deletions

View File

@@ -256,10 +256,7 @@ class CanvasVectorLayerRenderer extends CanvasLayerRenderer {
(!replayGroup || replayGroup.isEmpty()) &&
(!declutterExecutorGroup || declutterExecutorGroup.isEmpty())
) {
if (!this.containerReused && canvas.width > 0) {
canvas.width = 0;
}
return this.container;
return null;
}
// resize and clear