Remove goog.isDef from controls (-278 B)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
goog.provide('ol.control');
|
||||
|
||||
goog.require('ol');
|
||||
goog.require('ol.Collection');
|
||||
goog.require('ol.control.Attribution');
|
||||
goog.require('ol.control.Rotate');
|
||||
@@ -20,23 +21,23 @@ goog.require('ol.control.Zoom');
|
||||
*/
|
||||
ol.control.defaults = function(opt_options) {
|
||||
|
||||
var options = goog.isDef(opt_options) ? opt_options : {};
|
||||
var options = opt_options ? opt_options : {};
|
||||
|
||||
var controls = new ol.Collection();
|
||||
|
||||
var zoomControl = goog.isDef(options.zoom) ?
|
||||
var zoomControl = ol.isDef(options.zoom) ?
|
||||
options.zoom : true;
|
||||
if (zoomControl) {
|
||||
controls.push(new ol.control.Zoom(options.zoomOptions));
|
||||
}
|
||||
|
||||
var rotateControl = goog.isDef(options.rotate) ?
|
||||
var rotateControl = ol.isDef(options.rotate) ?
|
||||
options.rotate : true;
|
||||
if (rotateControl) {
|
||||
controls.push(new ol.control.Rotate(options.rotateOptions));
|
||||
}
|
||||
|
||||
var attributionControl = goog.isDef(options.attribution) ?
|
||||
var attributionControl = ol.isDef(options.attribution) ?
|
||||
options.attribution : true;
|
||||
if (attributionControl) {
|
||||
controls.push(new ol.control.Attribution(options.attributionOptions));
|
||||
|
||||
Reference in New Issue
Block a user