From 87a3510c830014ee103411b14552bde2ce12d76a Mon Sep 17 00:00:00 2001 From: ahocevar Date: Wed, 18 Jul 2018 12:19:15 +0200 Subject: [PATCH] Clean up super calls --- src/ol/style/RegularShape.js | 39 ++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/src/ol/style/RegularShape.js b/src/ol/style/RegularShape.js index 34f7ee4853..eddf889e1e 100644 --- a/src/ol/style/RegularShape.js +++ b/src/ol/style/RegularShape.js @@ -57,7 +57,25 @@ class RegularShape extends ImageStyle { * @api */ constructor(options) { - super(); + /** + * @type {boolean} + */ + const snapToPixel = options.snapToPixel !== undefined ? + options.snapToPixel : true; + + /** + * @type {boolean} + */ + const rotateWithView = options.rotateWithView !== undefined ? + options.rotateWithView : false; + + super({ + opacity: 1, + rotateWithView: rotateWithView, + rotation: options.rotation !== undefined ? options.rotation : 0, + scale: 1, + snapToPixel: snapToPixel + }); /** * @private @@ -152,25 +170,6 @@ class RegularShape extends ImageStyle { this.render_(this.atlasManager_); - /** - * @type {boolean} - */ - const snapToPixel = options.snapToPixel !== undefined ? - options.snapToPixel : true; - - /** - * @type {boolean} - */ - const rotateWithView = options.rotateWithView !== undefined ? - options.rotateWithView : false; - - super({ - opacity: 1, - rotateWithView: rotateWithView, - rotation: options.rotation !== undefined ? options.rotation : 0, - scale: 1, - snapToPixel: snapToPixel - }); } /**