Named export for ol/style
This commit is contained in:
@@ -9,7 +9,7 @@ import {getWidth} from '../extent.js';
|
||||
import {TRUE} from '../functions.js';
|
||||
import _ol_layer_Layer_ from '../layer/Layer.js';
|
||||
import _ol_plugins_ from '../plugins.js';
|
||||
import _ol_style_ from '../style.js';
|
||||
import {iconImageCache} from '../style.js';
|
||||
import _ol_transform_ from '../transform.js';
|
||||
|
||||
/**
|
||||
@@ -84,8 +84,7 @@ _ol_renderer_Map_.prototype.removeLayerRenderers = function() {
|
||||
* @private
|
||||
*/
|
||||
_ol_renderer_Map_.expireIconCache_ = function(map, frameState) {
|
||||
var cache = _ol_style_.iconImageCache;
|
||||
cache.expire();
|
||||
iconImageCache.expire();
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -2,11 +2,9 @@
|
||||
* @module ol/style
|
||||
*/
|
||||
import IconImageCache from './style/IconImageCache.js';
|
||||
var _ol_style_ = {};
|
||||
|
||||
/**
|
||||
* The {@link ol.style.IconImageCache} for {@link ol.style.Icon} images.
|
||||
* @api
|
||||
*/
|
||||
_ol_style_.iconImageCache = new IconImageCache();
|
||||
export default _ol_style_;
|
||||
export var iconImageCache = new IconImageCache();
|
||||
|
||||
@@ -7,7 +7,7 @@ import _ol_events_ from '../events.js';
|
||||
import EventTarget from '../events/EventTarget.js';
|
||||
import EventType from '../events/EventType.js';
|
||||
import ImageState from '../ImageState.js';
|
||||
import _ol_style_ from '../style.js';
|
||||
import {iconImageCache} from '../style.js';
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
@@ -103,7 +103,6 @@ inherits(_ol_style_IconImage_, EventTarget);
|
||||
*/
|
||||
_ol_style_IconImage_.get = function(image, src, size, crossOrigin, imageState,
|
||||
color) {
|
||||
var iconImageCache = _ol_style_.iconImageCache;
|
||||
var iconImage = iconImageCache.get(src, crossOrigin, color);
|
||||
if (!iconImage) {
|
||||
iconImage = new _ol_style_IconImage_(
|
||||
|
||||
Reference in New Issue
Block a user