Named export for ol/control
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
import {inherits} from './index.js';
|
||||
import _ol_PluggableMap_ from './PluggableMap.js';
|
||||
import _ol_PluginType_ from './PluginType.js';
|
||||
import _ol_control_ from './control.js';
|
||||
import {defaults as defaultControls} from './control.js';
|
||||
import _ol_interaction_ from './interaction.js';
|
||||
import _ol_obj_ from './obj.js';
|
||||
import _ol_plugins_ from './plugins.js';
|
||||
@@ -76,7 +76,7 @@ var _ol_CanvasMap_ = function(options) {
|
||||
options = _ol_obj_.assign({}, options);
|
||||
delete options.renderer;
|
||||
if (!options.controls) {
|
||||
options.controls = _ol_control_.defaults();
|
||||
options.controls = defaultControls();
|
||||
}
|
||||
if (!options.interactions) {
|
||||
options.interactions = _ol_interaction_.defaults();
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
import {inherits} from './index.js';
|
||||
import _ol_PluggableMap_ from './PluggableMap.js';
|
||||
import _ol_PluginType_ from './PluginType.js';
|
||||
import _ol_control_ from './control.js';
|
||||
import {defaults as defaultControls} from './control.js';
|
||||
import _ol_interaction_ from './interaction.js';
|
||||
import _ol_obj_ from './obj.js';
|
||||
import _ol_plugins_ from './plugins.js';
|
||||
@@ -87,7 +87,7 @@ _ol_plugins_.registerMultiple(_ol_PluginType_.LAYER_RENDERER, [
|
||||
var _ol_Map_ = function(options) {
|
||||
options = _ol_obj_.assign({}, options);
|
||||
if (!options.controls) {
|
||||
options.controls = _ol_control_.defaults();
|
||||
options.controls = defaultControls();
|
||||
}
|
||||
if (!options.interactions) {
|
||||
options.interactions = _ol_interaction_.defaults();
|
||||
|
||||
@@ -5,7 +5,6 @@ import _ol_Collection_ from './Collection.js';
|
||||
import Attribution from './control/Attribution.js';
|
||||
import Rotate from './control/Rotate.js';
|
||||
import Zoom from './control/Zoom.js';
|
||||
var _ol_control_ = {};
|
||||
|
||||
|
||||
/**
|
||||
@@ -20,7 +19,7 @@ var _ol_control_ = {};
|
||||
* @return {ol.Collection.<ol.control.Control>} Controls.
|
||||
* @api
|
||||
*/
|
||||
_ol_control_.defaults = function(opt_options) {
|
||||
export function defaults(opt_options) {
|
||||
|
||||
var options = opt_options ? opt_options : {};
|
||||
|
||||
@@ -44,5 +43,4 @@ _ol_control_.defaults = function(opt_options) {
|
||||
|
||||
return controls;
|
||||
|
||||
};
|
||||
export default _ol_control_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user