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

View File

@@ -52,16 +52,16 @@ import ImageStyle from '../style/Image.js';
*/
/**
* @classdesc
* Set icon style for vector features.
*
* @constructor
* @param {module:ol/style/Icon~Options=} opt_options Options.
* @extends {module:ol/style/Image}
* @api
*/
class Icon {
class Icon extends ImageStyle {
/**
* @classdesc
* Set icon style for vector features.
*
* @constructor
* @param {module:ol/style/Icon~Options=} opt_options Options.
* @extends {module:ol/style/Image}
* @api
*/
constructor(opt_options) {
const options = opt_options || {};
@@ -203,7 +203,7 @@ class Icon {
const snapToPixel = options.snapToPixel !== undefined ?
options.snapToPixel : true;
ImageStyle.call(this, {
super({
opacity: opacity,
rotation: rotation,
scale: scale,
@@ -418,7 +418,5 @@ class Icon {
}
}
inherits(Icon, ImageStyle);
export default Icon;