Merge pull request #2560 from fredj/optim
Don't create unnecessary closure
This commit is contained in:
@@ -99,6 +99,16 @@ ol.renderer.Map.prototype.disposeInternal = function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {ol.Map} map Map.
|
||||||
|
* @param {olx.FrameState} frameState Frame state.
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
|
ol.renderer.Map.expireIconCache_ = function(map, frameState) {
|
||||||
|
ol.style.IconImageCache.getInstance().expire();
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {ol.Coordinate} coordinate Coordinate.
|
* @param {ol.Coordinate} coordinate Coordinate.
|
||||||
* @param {olx.FrameState} frameState FrameState.
|
* @param {olx.FrameState} frameState FrameState.
|
||||||
@@ -256,14 +266,7 @@ ol.renderer.Map.prototype.removeUnusedLayerRenderers_ =
|
|||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
ol.renderer.Map.prototype.scheduleExpireIconCache = function(frameState) {
|
ol.renderer.Map.prototype.scheduleExpireIconCache = function(frameState) {
|
||||||
frameState.postRenderFunctions.push(
|
frameState.postRenderFunctions.push(ol.renderer.Map.expireIconCache_);
|
||||||
/**
|
|
||||||
* @param {ol.Map} map Map.
|
|
||||||
* @param {olx.FrameState} frameState Frame state.
|
|
||||||
*/
|
|
||||||
function(map, frameState) {
|
|
||||||
ol.style.IconImageCache.getInstance().expire();
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user