@@ -1 +1 @@
|
||||
@exportSymbol ol.control.defaults ol.control.defaults
|
||||
@exportFunction ol.control.defaults ol.control.DefaultsOptions ol.Collection
|
||||
|
||||
@@ -8,10 +8,9 @@ goog.require('ol.control.Zoom');
|
||||
|
||||
/**
|
||||
* @param {ol.control.DefaultsOptions=} opt_options Defaults options.
|
||||
* @param {Array.<ol.control.Control>=} opt_controls Additional controls.
|
||||
* @return {ol.Collection} Controls.
|
||||
*/
|
||||
ol.control.defaults = function(opt_options, opt_controls) {
|
||||
ol.control.defaults = function(opt_options) {
|
||||
|
||||
var options = goog.isDef(opt_options) ? opt_options : {};
|
||||
|
||||
@@ -36,15 +35,11 @@ ol.control.defaults = function(opt_options, opt_controls) {
|
||||
var zoomControl = goog.isDef(options.zoom) ?
|
||||
options.zoom : true;
|
||||
if (zoomControl) {
|
||||
var zoomControlOptions = goog.isDef(options.zoomControlOptions) ?
|
||||
options.zoomControlOptions : undefined;
|
||||
var zoomControlOptions = goog.isDef(options.zoomOptions) ?
|
||||
options.zoomOptions : undefined;
|
||||
controls.push(new ol.control.Zoom(zoomControlOptions));
|
||||
}
|
||||
|
||||
if (goog.isDef(opt_controls)) {
|
||||
controls.extend(opt_controls);
|
||||
}
|
||||
|
||||
return controls;
|
||||
|
||||
};
|
||||
|
||||
@@ -6,7 +6,7 @@ goog.require('goog.dom');
|
||||
goog.require('goog.dom.TagName');
|
||||
goog.require('goog.events');
|
||||
goog.require('goog.events.EventType');
|
||||
goog.require('ol.animation');
|
||||
goog.require('ol.animation.zoom');
|
||||
goog.require('ol.control.Control');
|
||||
goog.require('ol.css');
|
||||
goog.require('ol.easing');
|
||||
|
||||
@@ -15,7 +15,7 @@ goog.require('goog.fx.Dragger.EventType');
|
||||
goog.require('goog.math');
|
||||
goog.require('goog.math.Rect');
|
||||
goog.require('goog.style');
|
||||
goog.require('ol.animation');
|
||||
goog.require('ol.animation.zoom');
|
||||
goog.require('ol.control.Control');
|
||||
goog.require('ol.css');
|
||||
goog.require('ol.easing');
|
||||
|
||||
Reference in New Issue
Block a user