Remove useless test in default controls
This commit is contained in:
@@ -21,33 +21,25 @@ ol.control.defaults = function(opt_options) {
|
|||||||
var zoomControl = goog.isDef(options.zoom) ?
|
var zoomControl = goog.isDef(options.zoom) ?
|
||||||
options.zoom : true;
|
options.zoom : true;
|
||||||
if (zoomControl) {
|
if (zoomControl) {
|
||||||
var zoomControlOptions = goog.isDef(options.zoomOptions) ?
|
controls.push(new ol.control.Zoom(options.zoomOptions));
|
||||||
options.zoomOptions : undefined;
|
|
||||||
controls.push(new ol.control.Zoom(zoomControlOptions));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var rotateControl = goog.isDef(options.rotate) ?
|
var rotateControl = goog.isDef(options.rotate) ?
|
||||||
options.rotate : true;
|
options.rotate : true;
|
||||||
if (rotateControl) {
|
if (rotateControl) {
|
||||||
var rotateControlOptions = goog.isDef(options.rotateOptions) ?
|
controls.push(new ol.control.Rotate(options.rotateOptions));
|
||||||
options.rotateOptions : undefined;
|
|
||||||
controls.push(new ol.control.Rotate(rotateControlOptions));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var attributionControl = goog.isDef(options.attribution) ?
|
var attributionControl = goog.isDef(options.attribution) ?
|
||||||
options.attribution : true;
|
options.attribution : true;
|
||||||
if (attributionControl) {
|
if (attributionControl) {
|
||||||
var attributionControlOptions = goog.isDef(options.attributionOptions) ?
|
controls.push(new ol.control.Attribution(options.attributionOptions));
|
||||||
options.attributionOptions : undefined;
|
|
||||||
controls.push(new ol.control.Attribution(attributionControlOptions));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var logoControl = goog.isDef(options.logo) ?
|
var logoControl = goog.isDef(options.logo) ?
|
||||||
options.logo : true;
|
options.logo : true;
|
||||||
if (logoControl) {
|
if (logoControl) {
|
||||||
var logoControlOptions = goog.isDef(options.logoOptions) ?
|
controls.push(new ol.control.Logo(options.logoOptions));
|
||||||
options.logoOptions : undefined;
|
|
||||||
controls.push(new ol.control.Logo(logoControlOptions));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return controls;
|
return controls;
|
||||||
|
|||||||
Reference in New Issue
Block a user