Toward natural JavaScript syntax

This commit is contained in:
Tim Schaub
2015-09-25 12:16:42 -06:00
parent d610b206f7
commit 0927c55b3c
40 changed files with 146 additions and 188 deletions

View File

@@ -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));