Use extends and super for ImageBase
This commit is contained in:
+2
-6
@@ -1,15 +1,13 @@
|
|||||||
/**
|
/**
|
||||||
* @module ol/ImageBase
|
* @module ol/ImageBase
|
||||||
*/
|
*/
|
||||||
import {inherits} from './util.js';
|
|
||||||
import EventTarget from './events/EventTarget.js';
|
import EventTarget from './events/EventTarget.js';
|
||||||
import EventType from './events/EventType.js';
|
import EventType from './events/EventType.js';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @abstract
|
* @abstract
|
||||||
* @extends {module:ol/events/EventTarget}
|
|
||||||
*/
|
*/
|
||||||
class ImageBase {
|
class ImageBase extends EventTarget {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {module:ol/extent~Extent} extent Extent.
|
* @param {module:ol/extent~Extent} extent Extent.
|
||||||
@@ -19,7 +17,7 @@ class ImageBase {
|
|||||||
*/
|
*/
|
||||||
constructor(extent, resolution, pixelRatio, state) {
|
constructor(extent, resolution, pixelRatio, state) {
|
||||||
|
|
||||||
EventTarget.call(this);
|
super();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @protected
|
* @protected
|
||||||
@@ -95,7 +93,5 @@ class ImageBase {
|
|||||||
load() {}
|
load() {}
|
||||||
}
|
}
|
||||||
|
|
||||||
inherits(ImageBase, EventTarget);
|
|
||||||
|
|
||||||
|
|
||||||
export default ImageBase;
|
export default ImageBase;
|
||||||
|
|||||||
Reference in New Issue
Block a user