Use named exports from ol/index.js
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @module ol/style/AtlasManager
|
||||
*/
|
||||
import _ol_ from '../index.js';
|
||||
import {INITIAL_ATLAS_SIZE, MAX_ATLAS_SIZE, WEBGL_MAX_TEXTURE_SIZE, nullFunction} from '../index.js';
|
||||
import _ol_style_Atlas_ from '../style/Atlas.js';
|
||||
|
||||
/**
|
||||
@@ -31,7 +31,7 @@ var _ol_style_AtlasManager_ = function(opt_options) {
|
||||
* @type {number}
|
||||
*/
|
||||
this.currentSize_ = options.initialSize !== undefined ?
|
||||
options.initialSize : _ol_.INITIAL_ATLAS_SIZE;
|
||||
options.initialSize : INITIAL_ATLAS_SIZE;
|
||||
|
||||
/**
|
||||
* The maximum size in pixels of atlas images.
|
||||
@@ -39,9 +39,9 @@ var _ol_style_AtlasManager_ = function(opt_options) {
|
||||
* @type {number}
|
||||
*/
|
||||
this.maxSize_ = options.maxSize !== undefined ?
|
||||
options.maxSize : _ol_.MAX_ATLAS_SIZE != -1 ?
|
||||
_ol_.MAX_ATLAS_SIZE : _ol_.WEBGL_MAX_TEXTURE_SIZE !== undefined ?
|
||||
_ol_.WEBGL_MAX_TEXTURE_SIZE : 2048;
|
||||
options.maxSize : MAX_ATLAS_SIZE != -1 ?
|
||||
MAX_ATLAS_SIZE : WEBGL_MAX_TEXTURE_SIZE !== undefined ?
|
||||
WEBGL_MAX_TEXTURE_SIZE : 2048;
|
||||
|
||||
/**
|
||||
* The size in pixels between images.
|
||||
@@ -167,7 +167,7 @@ _ol_style_AtlasManager_.prototype.add = function(id, width, height,
|
||||
// the hit-detection atlas, to make sure that the offset is the same for
|
||||
// the original image and the hit-detection image.
|
||||
var renderHitCallback = opt_renderHitCallback !== undefined ?
|
||||
opt_renderHitCallback : _ol_.nullFunction;
|
||||
opt_renderHitCallback : nullFunction;
|
||||
|
||||
var hitInfo = /** @type {ol.AtlasInfo} */ (this.add_(true,
|
||||
id, width, height, renderHitCallback, opt_this));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @module ol/style/Circle
|
||||
*/
|
||||
import _ol_ from '../index.js';
|
||||
import {inherits} from '../index.js';
|
||||
import _ol_style_RegularShape_ from '../style/RegularShape.js';
|
||||
|
||||
/**
|
||||
@@ -28,7 +28,7 @@ var _ol_style_Circle_ = function(opt_options) {
|
||||
|
||||
};
|
||||
|
||||
_ol_.inherits(_ol_style_Circle_, _ol_style_RegularShape_);
|
||||
inherits(_ol_style_Circle_, _ol_style_RegularShape_);
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @module ol/style/Fill
|
||||
*/
|
||||
import _ol_ from '../index.js';
|
||||
import {getUid} from '../index.js';
|
||||
import _ol_color_ from '../color.js';
|
||||
|
||||
/**
|
||||
@@ -74,7 +74,7 @@ _ol_style_Fill_.prototype.getChecksum = function() {
|
||||
this.color_ instanceof CanvasPattern ||
|
||||
this.color_ instanceof CanvasGradient
|
||||
) {
|
||||
this.checksum_ = _ol_.getUid(this.color_).toString();
|
||||
this.checksum_ = getUid(this.color_).toString();
|
||||
} else {
|
||||
this.checksum_ = 'f' + (this.color_ ?
|
||||
_ol_color_.asString(this.color_) : '-');
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @module ol/style/Icon
|
||||
*/
|
||||
import _ol_ from '../index.js';
|
||||
import {getUid, inherits} from '../index.js';
|
||||
import _ol_ImageState_ from '../ImageState.js';
|
||||
import _ol_asserts_ from '../asserts.js';
|
||||
import _ol_color_ from '../color.js';
|
||||
@@ -86,7 +86,7 @@ var _ol_style_Icon_ = function(opt_options) {
|
||||
5); // `imgSize` must be set when `image` is provided
|
||||
|
||||
if ((src === undefined || src.length === 0) && image) {
|
||||
src = image.src || _ol_.getUid(image).toString();
|
||||
src = image.src || getUid(image).toString();
|
||||
}
|
||||
_ol_asserts_.assert(src !== undefined && src.length > 0,
|
||||
6); // A defined and non-empty `src` or `image` must be provided
|
||||
@@ -173,7 +173,7 @@ var _ol_style_Icon_ = function(opt_options) {
|
||||
|
||||
};
|
||||
|
||||
_ol_.inherits(_ol_style_Icon_, _ol_style_Image_);
|
||||
inherits(_ol_style_Icon_, _ol_style_Image_);
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @module ol/style/IconImage
|
||||
*/
|
||||
import _ol_ from '../index.js';
|
||||
import {inherits} from '../index.js';
|
||||
import _ol_dom_ from '../dom.js';
|
||||
import _ol_events_ from '../events.js';
|
||||
import _ol_events_EventTarget_ from '../events/EventTarget.js';
|
||||
@@ -89,7 +89,7 @@ var _ol_style_IconImage_ = function(image, src, size, crossOrigin, imageState,
|
||||
|
||||
};
|
||||
|
||||
_ol_.inherits(_ol_style_IconImage_, _ol_events_EventTarget_);
|
||||
inherits(_ol_style_IconImage_, _ol_events_EventTarget_);
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @module ol/style/RegularShape
|
||||
*/
|
||||
import _ol_ from '../index.js';
|
||||
import {inherits} from '../index.js';
|
||||
import _ol_colorlike_ from '../colorlike.js';
|
||||
import _ol_dom_ from '../dom.js';
|
||||
import _ol_has_ from '../has.js';
|
||||
@@ -135,7 +135,7 @@ var _ol_style_RegularShape_ = function(options) {
|
||||
});
|
||||
};
|
||||
|
||||
_ol_.inherits(_ol_style_RegularShape_, _ol_style_Image_);
|
||||
inherits(_ol_style_RegularShape_, _ol_style_Image_);
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @module ol/style/Stroke
|
||||
*/
|
||||
import _ol_ from '../index.js';
|
||||
import {getUid} from '../index.js';
|
||||
|
||||
/**
|
||||
* @classdesc
|
||||
@@ -257,7 +257,7 @@ _ol_style_Stroke_.prototype.getChecksum = function() {
|
||||
if (typeof this.color_ === 'string') {
|
||||
this.checksum_ += this.color_;
|
||||
} else {
|
||||
this.checksum_ += _ol_.getUid(this.color_).toString();
|
||||
this.checksum_ += getUid(this.color_).toString();
|
||||
}
|
||||
} else {
|
||||
this.checksum_ += '-';
|
||||
|
||||
Reference in New Issue
Block a user