Use extends and super for Image
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
/**
|
||||
* @module ol/Image
|
||||
*/
|
||||
import {inherits} from './util.js';
|
||||
import ImageBase from './ImageBase.js';
|
||||
import ImageState from './ImageState.js';
|
||||
import {listenOnce, unlistenByKey} from './events.js';
|
||||
@@ -28,10 +27,7 @@ import {getHeight} from './extent.js';
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @extends {module:ol/ImageBase}
|
||||
*/
|
||||
class ImageWrapper {
|
||||
class ImageWrapper extends ImageBase {
|
||||
|
||||
/**
|
||||
* @param {module:ol/extent~Extent} extent Extent.
|
||||
@@ -43,7 +39,7 @@ class ImageWrapper {
|
||||
*/
|
||||
constructor(extent, resolution, pixelRatio, src, crossOrigin, imageLoadFunction) {
|
||||
|
||||
ImageBase.call(this, extent, resolution, pixelRatio, ImageState.IDLE);
|
||||
super(extent, resolution, pixelRatio, ImageState.IDLE);
|
||||
|
||||
/**
|
||||
* @private
|
||||
@@ -152,7 +148,5 @@ class ImageWrapper {
|
||||
}
|
||||
}
|
||||
|
||||
inherits(ImageWrapper, ImageBase);
|
||||
|
||||
|
||||
export default ImageWrapper;
|
||||
|
||||
Reference in New Issue
Block a user