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