Use the constructor options instead of changing the private variables

This commit is contained in:
Frederic Junod
2019-02-27 15:10:56 +01:00
parent 02f9411c6b
commit 7c7b43ee91

View File

@@ -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;
}