Remove remaining use of inherits in src

This commit is contained in:
Tim Schaub
2018-07-17 23:43:10 -06:00
parent f6046c023c
commit 1a5cf52b61
63 changed files with 837 additions and 982 deletions
+13 -15
View File
@@ -46,18 +46,18 @@ import ImageStyle from '../style/Image.js';
*/
/**
* @classdesc
* Set regular shape style for vector features. The resulting shape will be
* a regular polygon when `radius` is provided, or a star when `radius1` and
* `radius2` are provided.
*
* @constructor
* @param {module:ol/style/RegularShape~Options} options Options.
* @extends {module:ol/style/Image}
* @api
*/
class RegularShape {
class RegularShape extends ImageStyle {
/**
* @classdesc
* Set regular shape style for vector features. The resulting shape will be
* a regular polygon when `radius` is provided, or a star when `radius1` and
* `radius2` are provided.
*
* @constructor
* @param {module:ol/style/RegularShape~Options} options Options.
* @extends {module:ol/style/Image}
* @api
*/
constructor(options) {
/**
* @private
@@ -164,7 +164,7 @@ class RegularShape {
const rotateWithView = options.rotateWithView !== undefined ?
options.rotateWithView : false;
ImageStyle.call(this, {
super({
opacity: 1,
rotateWithView: rotateWithView,
rotation: options.rotation !== undefined ? options.rotation : 0,
@@ -591,7 +591,5 @@ class RegularShape {
}
}
inherits(RegularShape, ImageStyle);
export default RegularShape;