Toward natural JavaScript syntax
This commit is contained in:
@@ -25,19 +25,17 @@ ol.control.defaults = function(opt_options) {
|
||||
|
||||
var controls = new ol.Collection();
|
||||
|
||||
var zoomControl = ol.isDef(options.zoom) ?
|
||||
options.zoom : true;
|
||||
var zoomControl = options.zoom !== undefined ? options.zoom : true;
|
||||
if (zoomControl) {
|
||||
controls.push(new ol.control.Zoom(options.zoomOptions));
|
||||
}
|
||||
|
||||
var rotateControl = ol.isDef(options.rotate) ?
|
||||
options.rotate : true;
|
||||
var rotateControl = options.rotate !== undefined ? options.rotate : true;
|
||||
if (rotateControl) {
|
||||
controls.push(new ol.control.Rotate(options.rotateOptions));
|
||||
}
|
||||
|
||||
var attributionControl = ol.isDef(options.attribution) ?
|
||||
var attributionControl = options.attribution !== undefined ?
|
||||
options.attribution : true;
|
||||
if (attributionControl) {
|
||||
controls.push(new ol.control.Attribution(options.attributionOptions));
|
||||
|
||||
Reference in New Issue
Block a user