Merge pull request #9276 from fredj/graticule_cleanup

Use the constructor options instead of changing the private variables
This commit is contained in:
Frédéric Junod
2019-02-27 17:02:41 +01:00
committed by GitHub

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