Use extends and super for TileCache
This commit is contained in:
+2
-8
@@ -1,21 +1,17 @@
|
|||||||
/**
|
/**
|
||||||
* @module ol/TileCache
|
* @module ol/TileCache
|
||||||
*/
|
*/
|
||||||
import {inherits} from './util.js';
|
|
||||||
import LRUCache from './structs/LRUCache.js';
|
import LRUCache from './structs/LRUCache.js';
|
||||||
import {fromKey, getKey} from './tilecoord.js';
|
import {fromKey, getKey} from './tilecoord.js';
|
||||||
|
|
||||||
/**
|
class TileCache extends LRUCache {
|
||||||
* @extends {module:ol/structs/LRUCache.<module:ol/Tile>}
|
|
||||||
*/
|
|
||||||
class TileCache {
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {number=} opt_highWaterMark High water mark.
|
* @param {number=} opt_highWaterMark High water mark.
|
||||||
*/
|
*/
|
||||||
constructor(opt_highWaterMark) {
|
constructor(opt_highWaterMark) {
|
||||||
|
|
||||||
LRUCache.call(this, opt_highWaterMark);
|
super(opt_highWaterMark);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -53,7 +49,5 @@ class TileCache {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inherits(TileCache, LRUCache);
|
|
||||||
|
|
||||||
|
|
||||||
export default TileCache;
|
export default TileCache;
|
||||||
|
|||||||
Reference in New Issue
Block a user