Export shared icon image class from IconImageCache module
This commit is contained in:
@@ -8,8 +8,9 @@ import EventType from '../events/EventType.js';
|
|||||||
import {getWidth} from '../extent.js';
|
import {getWidth} from '../extent.js';
|
||||||
import {TRUE, UNDEFINED} from '../functions.js';
|
import {TRUE, UNDEFINED} from '../functions.js';
|
||||||
import {visibleAtResolution} from '../layer/Layer.js';
|
import {visibleAtResolution} from '../layer/Layer.js';
|
||||||
import {iconImageCache} from '../style.js';
|
import {shared as iconImageCache} from '../style/IconImageCache.js';
|
||||||
import {compose as composeTransform, invert as invertTransform, setFromArray as transformSetFromArray} from '../transform.js';
|
import {compose as composeTransform, invert as invertTransform, setFromArray as transformSetFromArray} from '../transform.js'; import IconImageCache from '../style/IconImageCache.js';
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
|
|||||||
@@ -13,13 +13,3 @@
|
|||||||
* (module:ol/style/Style~Style|Array.<module:ol/style/Style~Style>)} StyleFunction
|
* (module:ol/style/Style~Style|Array.<module:ol/style/Style~Style>)} StyleFunction
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
import IconImageCache from './style/IconImageCache.js';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The {@link module:ol/style/IconImageCache~IconImageCache} for
|
|
||||||
* {@link module:ol/style/Icon~Icon} images.
|
|
||||||
* @api
|
|
||||||
*/
|
|
||||||
export const iconImageCache = new IconImageCache();
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import {listenOnce, unlistenByKey} from '../events.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';
|
||||||
import ImageState from '../ImageState.js';
|
import ImageState from '../ImageState.js';
|
||||||
import {iconImageCache} from '../style.js';
|
import {shared as iconImageCache} from '../style/IconImageCache.js';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
import {asString} from '../color.js';
|
import {asString} from '../color.js';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Singleton class. Available through {@link ol.style.iconImageCache}.
|
* Singleton class. Available through {@link module:ol/style/IconImageCache~shared}.
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
const IconImageCache = function() {
|
const IconImageCache = function() {
|
||||||
@@ -104,3 +104,11 @@ IconImageCache.prototype.setSize = function(maxCacheSize) {
|
|||||||
this.expire();
|
this.expire();
|
||||||
};
|
};
|
||||||
export default IconImageCache;
|
export default IconImageCache;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The {@link module:ol/style/IconImageCache~IconImageCache} for
|
||||||
|
* {@link module:ol/style/Icon~Icon} images.
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
export const shared = new IconImageCache();
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import {getUid} from '../../../../src/ol/index.js';
|
import {getUid} from '../../../../src/ol/index.js';
|
||||||
import {iconImageCache} from '../../../../src/ol/style.js';
|
import {shared as iconImageCache} from '../../../../src/ol/style/IconImageCache.js';
|
||||||
import Icon from '../../../../src/ol/style/Icon.js';
|
import Icon from '../../../../src/ol/style/Icon.js';
|
||||||
import IconImage, {get as getIconImage} from '../../../../src/ol/style/IconImage.js';
|
import IconImage, {get as getIconImage} from '../../../../src/ol/style/IconImage.js';
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import {UNDEFINED} from '../../../../src/ol/functions.js';
|
import {UNDEFINED} from '../../../../src/ol/functions.js';
|
||||||
import {listen} from '../../../../src/ol/events.js';
|
import {listen} from '../../../../src/ol/events.js';
|
||||||
import {iconImageCache} from '../../../../src/ol/style.js';
|
import {shared as iconImageCache} from '../../../../src/ol/style/IconImageCache.js';
|
||||||
import IconImage from '../../../../src/ol/style/IconImage.js';
|
import IconImage from '../../../../src/ol/style/IconImage.js';
|
||||||
|
|
||||||
describe('ol.style.IconImageCache', function() {
|
describe('ol.style.IconImageCache', function() {
|
||||||
|
|||||||
Reference in New Issue
Block a user