Smarter opacity handling

This commit is contained in:
ahocevar
2019-05-22 15:39:21 +02:00
parent ae47d3df58
commit ace5c65ee5
7 changed files with 39 additions and 19 deletions

View File

@@ -79,7 +79,7 @@ class CanvasLayerRenderer extends LayerRenderer {
useContainer(target, transform, opacity) {
const layerClassName = this.getLayer().getClassName();
let container, context;
if (target) {
if (target && target.style.opacity === '') {
const canvas = target.firstElementChild;
if (canvas instanceof HTMLCanvasElement) {
context = canvas.getContext('2d');