Named exports from ol/style/IconImage

This commit is contained in:
Frederic Junod
2018-02-21 17:00:25 +01:00
parent fa1fcc79b6
commit e3deae940d
3 changed files with 8 additions and 12 deletions
+4 -7
View File
@@ -19,8 +19,7 @@ import {iconImageCache} from '../style.js';
* @param {ol.Color} color Color.
* @extends {ol.events.EventTarget}
*/
const IconImage = function(image, src, size, crossOrigin, imageState,
color) {
const IconImage = function(image, src, size, crossOrigin, imageState, color) {
EventTarget.call(this);
@@ -101,16 +100,14 @@ inherits(IconImage, EventTarget);
* @param {ol.Color} color Color.
* @return {ol.style.IconImage} Icon image.
*/
IconImage.get = function(image, src, size, crossOrigin, imageState,
color) {
export function get(image, src, size, crossOrigin, imageState, color) {
let iconImage = iconImageCache.get(src, crossOrigin, color);
if (!iconImage) {
iconImage = new IconImage(
image, src, size, crossOrigin, imageState, color);
iconImage = new IconImage(image, src, size, crossOrigin, imageState, color);
iconImageCache.set(src, crossOrigin, color, iconImage);
}
return iconImage;
};
}
/**