Dispatch layer changed event when layer needs a re-render

This commit is contained in:
Tim Schaub
2018-11-15 18:03:02 +01:00
parent 7a82904a3b
commit ac3a1fb953
2 changed files with 1 additions and 2 deletions

View File

@@ -158,7 +158,7 @@ class LayerRenderer extends Observable {
renderIfReadyAndVisible() {
const layer = this.getLayer();
if (layer.getVisible() && layer.getSourceState() == SourceState.READY) {
this.changed();
layer.changed();
}
}

View File

@@ -212,7 +212,6 @@ class ImageSource extends Source {
this.dispatchEvent(
new ImageSourceEvent(ImageSourceEventType.IMAGELOADEND,
image));
this.changed();
break;
case ImageState.ERROR:
this.loading = false;