From 7c7b43ee91bc8e4954b7abfb8fa0237400cb002a Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Wed, 27 Feb 2019 15:10:56 +0100 Subject: [PATCH] Use the constructor options instead of changing the private variables --- src/ol/layer/Graticule.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/ol/layer/Graticule.js b/src/ol/layer/Graticule.js index 8555c2d346..f679c45ee6 100644 --- a/src/ol/layer/Graticule.js +++ b/src/ol/layer/Graticule.js @@ -150,7 +150,11 @@ class Graticule extends VectorLayer { constructor(opt_options) { const options = opt_options ? opt_options : {}; - const baseOptions = assign({}, options); + const baseOptions = assign({ + updateWhileAnimating: true, + updateWhileInteracting: true, + renderBuffer: 0 + }, options); delete baseOptions.maxLines; delete baseOptions.strokeStyle; @@ -422,11 +426,6 @@ class Graticule extends VectorLayer { this.setRenderOrder(null); - this.renderBuffer_ = 0; - - this.updateWhileAnimating_ = true; - this.updateWhileInteracting_ = true; - this.tmpExtent_ = null; }