From d54864695db8a922337f5d67e11b698bb06914b8 Mon Sep 17 00:00:00 2001 From: Bruno Binet Date: Tue, 29 Jan 2013 12:56:15 +0100 Subject: [PATCH] Add a removePreRenderFunction method to ol.Map This will remove the pre-render function from preRenderFunctions_ array if found. --- src/ol/map.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/ol/map.js b/src/ol/map.js index 1432c45612..23b42bc203 100644 --- a/src/ol/map.js +++ b/src/ol/map.js @@ -326,6 +326,15 @@ ol.Map.prototype.addPreRenderFunctions = function(preRenderFunctions) { }; +/** + * @param {ol.PreRenderFunction} preRenderFunction Pre-render function. + * @return {boolean} Whether the preRenderFunction has been found and removed. + */ +ol.Map.prototype.removePreRenderFunction = function(preRenderFunction) { + return goog.array.remove(this.preRenderFunctions_, preRenderFunction); +}; + + /** * * @inheritDoc