Make render listeners work with image render mode

This commit is contained in:
ahocevar
2018-07-09 19:21:19 +02:00
parent d0a8043edc
commit 5d6721192d
2 changed files with 22 additions and 4 deletions

View File

@@ -210,10 +210,10 @@ CanvasVectorLayerRenderer.prototype.compose = function(context, frameState, laye
rotateAtOffset(replayContext, rotation,
width / 2, height / 2);
if (hasRenderListeners) {
this.dispatchRenderEvent(replayContext, frameState, transform);
}
if (replayContext != context) {
if (hasRenderListeners) {
this.dispatchRenderEvent(replayContext, frameState, transform);
}
if (transparentLayer) {
const mainContextAlpha = context.globalAlpha;
context.globalAlpha = layerState.opacity;