Transformed

This commit is contained in:
Tim Schaub
2017-12-11 16:29:33 -07:00
parent 1cdb6a66f0
commit 7f47883c48
737 changed files with 22216 additions and 21609 deletions

View File

@@ -1,21 +1,23 @@
goog.provide('ol.plugins');
goog.require('ol.PluginType');
/**
* @module ol/plugins
*/
import _ol_PluginType_ from './PluginType.js';
var _ol_plugins_ = {};
/**
* The registry of map renderer plugins.
* @type {Array<olx.MapRendererPlugin>}
* @private
*/
ol.plugins.mapRendererPlugins_ = [];
_ol_plugins_.mapRendererPlugins_ = [];
/**
* Get all registered map renderer plugins.
* @return {Array<olx.MapRendererPlugin>} The registered map renderer plugins.
*/
ol.plugins.getMapRendererPlugins = function() {
return ol.plugins.mapRendererPlugins_;
_ol_plugins_.getMapRendererPlugins = function() {
return _ol_plugins_.mapRendererPlugins_;
};
@@ -24,15 +26,15 @@ ol.plugins.getMapRendererPlugins = function() {
* @type {Array<olx.LayerRendererPlugin>}
* @private
*/
ol.plugins.layerRendererPlugins_ = [];
_ol_plugins_.layerRendererPlugins_ = [];
/**
* Get all registered layer renderer plugins.
* @return {Array<olx.LayerRendererPlugin>} The registered layer renderer plugins.
*/
ol.plugins.getLayerRendererPlugins = function() {
return ol.plugins.layerRendererPlugins_;
_ol_plugins_.getLayerRendererPlugins = function() {
return _ol_plugins_.layerRendererPlugins_;
};
@@ -41,16 +43,16 @@ ol.plugins.getLayerRendererPlugins = function() {
* @param {ol.PluginType} type The plugin type.
* @param {*} plugin The plugin.
*/
ol.plugins.register = function(type, plugin) {
_ol_plugins_.register = function(type, plugin) {
var plugins;
switch (type) {
case ol.PluginType.MAP_RENDERER: {
plugins = ol.plugins.mapRendererPlugins_;
case _ol_PluginType_.MAP_RENDERER: {
plugins = _ol_plugins_.mapRendererPlugins_;
plugins.push(/** @type {olx.MapRendererPlugin} */ (plugin));
break;
}
case ol.PluginType.LAYER_RENDERER: {
plugins = ol.plugins.layerRendererPlugins_;
case _ol_PluginType_.LAYER_RENDERER: {
plugins = _ol_plugins_.layerRendererPlugins_;
plugins.push(/** @type {olx.LayerRendererPlugin} */ (plugin));
break;
}
@@ -66,8 +68,9 @@ ol.plugins.register = function(type, plugin) {
* @param {ol.PluginType} type The plugin type.
* @param {Array} plugins The plugins.
*/
ol.plugins.registerMultiple = function(type, plugins) {
_ol_plugins_.registerMultiple = function(type, plugins) {
for (var i = 0, ii = plugins.length; i < ii; ++i) {
ol.plugins.register(type, plugins[i]);
_ol_plugins_.register(type, plugins[i]);
}
};
export default _ol_plugins_;