Fix type check errors in ol/layer/Layer

This commit is contained in:
Kevin Schmidt
2018-10-03 10:42:05 -06:00
parent ddae414ddc
commit 38aa620afa

View File

@@ -192,13 +192,14 @@ class Layer extends BaseLayer {
}
if (map) {
this.mapPrecomposeKey_ = listen(map, RenderEventType.PRECOMPOSE, function(evt) {
const renderEvent = /** @type {import("../render/Event.js").default} */ (evt);
const layerState = this.getLayerState();
layerState.managed = false;
if (this.getZIndex() === undefined) {
layerState.zIndex = Infinity;
}
evt.frameState.layerStatesArray.push(layerState);
evt.frameState.layerStates[getUid(this)] = layerState;
renderEvent.frameState.layerStatesArray.push(layerState);
renderEvent.frameState.layerStates[getUid(this)] = layerState;
}, this);
this.mapRenderKey_ = listen(this, EventType.CHANGE, map.render, map);
this.changed();