Named exports from ol/obj
This commit is contained in:
@@ -5,7 +5,7 @@ import {inherits} from '../index.js';
|
||||
import BaseObject from '../Object.js';
|
||||
import LayerProperty from '../layer/Property.js';
|
||||
import {clamp} from '../math.js';
|
||||
import _ol_obj_ from '../obj.js';
|
||||
import {assign} from '../obj.js';
|
||||
|
||||
/**
|
||||
* @classdesc
|
||||
@@ -28,7 +28,7 @@ const BaseLayer = function(options) {
|
||||
/**
|
||||
* @type {Object.<string, *>}
|
||||
*/
|
||||
const properties = _ol_obj_.assign({}, options);
|
||||
const properties = assign({}, options);
|
||||
properties[LayerProperty.OPACITY] =
|
||||
options.opacity !== undefined ? options.opacity : 1;
|
||||
properties[LayerProperty.VISIBLE] =
|
||||
|
||||
@@ -11,7 +11,7 @@ import _ol_events_ from '../events.js';
|
||||
import EventType from '../events/EventType.js';
|
||||
import {getIntersection} from '../extent.js';
|
||||
import BaseLayer from '../layer/Base.js';
|
||||
import _ol_obj_ from '../obj.js';
|
||||
import {assign, clear} from '../obj.js';
|
||||
import SourceState from '../source/State.js';
|
||||
|
||||
|
||||
@@ -38,8 +38,7 @@ const Property = {
|
||||
const LayerGroup = function(opt_options) {
|
||||
|
||||
const options = opt_options || {};
|
||||
const baseOptions = /** @type {olx.layer.GroupOptions} */
|
||||
(_ol_obj_.assign({}, options));
|
||||
const baseOptions = /** @type {olx.layer.GroupOptions} */ (assign({}, options));
|
||||
delete baseOptions.layers;
|
||||
|
||||
let layers = options.layers;
|
||||
@@ -107,7 +106,7 @@ LayerGroup.prototype.handleLayersChanged_ = function(event) {
|
||||
for (const id in this.listenerKeys_) {
|
||||
this.listenerKeys_[id].forEach(_ol_events_.unlistenByKey);
|
||||
}
|
||||
_ol_obj_.clear(this.listenerKeys_);
|
||||
clear(this.listenerKeys_);
|
||||
|
||||
const layersArray = layers.getArray();
|
||||
let i, ii, layer;
|
||||
|
||||
@@ -7,7 +7,7 @@ import BaseObject from '../Object.js';
|
||||
import {createCanvasContext2D} from '../dom.js';
|
||||
import VectorLayer from '../layer/Vector.js';
|
||||
import {clamp} from '../math.js';
|
||||
import _ol_obj_ from '../obj.js';
|
||||
import {assign} from '../obj.js';
|
||||
import RenderEventType from '../render/EventType.js';
|
||||
import Icon from '../style/Icon.js';
|
||||
import Style from '../style/Style.js';
|
||||
@@ -47,7 +47,7 @@ const DEFAULT_GRADIENT = ['#00f', '#0ff', '#0f0', '#ff0', '#f00'];
|
||||
const Heatmap = function(opt_options) {
|
||||
const options = opt_options ? opt_options : {};
|
||||
|
||||
const baseOptions = _ol_obj_.assign({}, options);
|
||||
const baseOptions = assign({}, options);
|
||||
|
||||
delete baseOptions.gradient;
|
||||
delete baseOptions.radius;
|
||||
|
||||
@@ -7,7 +7,7 @@ import {getUid, inherits} from '../index.js';
|
||||
import BaseObject from '../Object.js';
|
||||
import BaseLayer from '../layer/Base.js';
|
||||
import LayerProperty from '../layer/Property.js';
|
||||
import _ol_obj_ from '../obj.js';
|
||||
import {assign} from '../obj.js';
|
||||
import RenderEventType from '../render/EventType.js';
|
||||
import SourceState from '../source/State.js';
|
||||
|
||||
@@ -35,7 +35,7 @@ import SourceState from '../source/State.js';
|
||||
*/
|
||||
const Layer = function(options) {
|
||||
|
||||
const baseOptions = _ol_obj_.assign({}, options);
|
||||
const baseOptions = assign({}, options);
|
||||
delete baseOptions.source;
|
||||
|
||||
BaseLayer.call(this, /** @type {olx.layer.BaseOptions} */ (baseOptions));
|
||||
|
||||
@@ -5,7 +5,7 @@ import {inherits} from '../index.js';
|
||||
import LayerType from '../LayerType.js';
|
||||
import Layer from '../layer/Layer.js';
|
||||
import _ol_layer_TileProperty_ from '../layer/TileProperty.js';
|
||||
import _ol_obj_ from '../obj.js';
|
||||
import {assign} from '../obj.js';
|
||||
|
||||
/**
|
||||
* @classdesc
|
||||
@@ -24,7 +24,7 @@ import _ol_obj_ from '../obj.js';
|
||||
const TileLayer = function(opt_options) {
|
||||
const options = opt_options ? opt_options : {};
|
||||
|
||||
const baseOptions = _ol_obj_.assign({}, options);
|
||||
const baseOptions = assign({}, options);
|
||||
|
||||
delete baseOptions.preload;
|
||||
delete baseOptions.useInterimTilesOnError;
|
||||
|
||||
@@ -5,7 +5,7 @@ import {inherits} from '../index.js';
|
||||
import LayerType from '../LayerType.js';
|
||||
import Layer from '../layer/Layer.js';
|
||||
import _ol_layer_VectorRenderType_ from '../layer/VectorRenderType.js';
|
||||
import _ol_obj_ from '../obj.js';
|
||||
import {assign} from '../obj.js';
|
||||
import Style from '../style/Style.js';
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ const VectorLayer = function(opt_options) {
|
||||
const options = opt_options ?
|
||||
opt_options : /** @type {olx.layer.VectorOptions} */ ({});
|
||||
|
||||
const baseOptions = _ol_obj_.assign({}, options);
|
||||
const baseOptions = assign({}, options);
|
||||
|
||||
delete baseOptions.style;
|
||||
delete baseOptions.renderBuffer;
|
||||
|
||||
@@ -7,7 +7,7 @@ import {assert} from '../asserts.js';
|
||||
import _ol_layer_TileProperty_ from '../layer/TileProperty.js';
|
||||
import VectorLayer from '../layer/Vector.js';
|
||||
import _ol_layer_VectorTileRenderType_ from '../layer/VectorTileRenderType.js';
|
||||
import _ol_obj_ from '../obj.js';
|
||||
import {assign} from '../obj.js';
|
||||
|
||||
/**
|
||||
* @classdesc
|
||||
@@ -35,7 +35,7 @@ const VectorTileLayer = function(opt_options) {
|
||||
}
|
||||
options.renderMode = renderMode;
|
||||
|
||||
const baseOptions = _ol_obj_.assign({}, options);
|
||||
const baseOptions = assign({}, options);
|
||||
|
||||
delete baseOptions.preload;
|
||||
delete baseOptions.useInterimTilesOnError;
|
||||
|
||||
Reference in New Issue
Block a user