Fix opacity handling for tile and vector layers

This commit is contained in:
Andreas Hocevar
2021-09-15 19:18:04 +02:00
parent cb6995d71a
commit 2f5e6906b9
5 changed files with 31 additions and 12 deletions

View File

@@ -17,6 +17,7 @@ import {
getTopRight,
} from '../../extent.js';
import {createCanvasContext2D} from '../../dom.js';
import {cssOpacity} from '../../css.js';
/**
* @abstract
@@ -88,7 +89,7 @@ class CanvasLayerRenderer extends LayerRenderer {
let container, context;
if (
target &&
target.style.opacity === '' &&
target.style.opacity === cssOpacity(opacity) &&
target.className === layerClassName
) {
const canvas = target.firstElementChild;