Rename goog.DEBUG to ol.DEBUG

This commit is contained in:
Andreas Hocevar
2016-08-28 17:02:49 +02:00
parent 92ab5a079c
commit d1e4b33760
115 changed files with 701 additions and 691 deletions

View File

@@ -144,8 +144,8 @@ ol.format.EsriJSON.convertRings_ = function(rings, layout) {
* @return {ol.geom.Geometry} Point.
*/
ol.format.EsriJSON.readPointGeometry_ = function(object) {
goog.DEBUG && console.assert(typeof object.x === 'number', 'object.x should be number');
goog.DEBUG && console.assert(typeof object.y === 'number', 'object.y should be number');
ol.DEBUG && console.assert(typeof object.x === 'number', 'object.x should be number');
ol.DEBUG && console.assert(typeof object.y === 'number', 'object.y should be number');
var point;
if (object.m !== undefined && object.z !== undefined) {
point = new ol.geom.Point([object.x, object.y, object.z, object.m],
@@ -169,9 +169,9 @@ ol.format.EsriJSON.readPointGeometry_ = function(object) {
* @return {ol.geom.Geometry} LineString.
*/
ol.format.EsriJSON.readLineStringGeometry_ = function(object) {
goog.DEBUG && console.assert(Array.isArray(object.paths),
ol.DEBUG && console.assert(Array.isArray(object.paths),
'object.paths should be an array');
goog.DEBUG && console.assert(object.paths.length === 1,
ol.DEBUG && console.assert(object.paths.length === 1,
'object.paths array length should be 1');
var layout = ol.format.EsriJSON.getGeometryLayout_(object);
return new ol.geom.LineString(object.paths[0], layout);
@@ -184,9 +184,9 @@ ol.format.EsriJSON.readLineStringGeometry_ = function(object) {
* @return {ol.geom.Geometry} MultiLineString.
*/
ol.format.EsriJSON.readMultiLineStringGeometry_ = function(object) {
goog.DEBUG && console.assert(Array.isArray(object.paths),
ol.DEBUG && console.assert(Array.isArray(object.paths),
'object.paths should be an array');
goog.DEBUG && console.assert(object.paths.length > 1,
ol.DEBUG && console.assert(object.paths.length > 1,
'object.paths array length should be more than 1');
var layout = ol.format.EsriJSON.getGeometryLayout_(object);
return new ol.geom.MultiLineString(object.paths, layout);
@@ -228,7 +228,7 @@ ol.format.EsriJSON.readMultiPointGeometry_ = function(object) {
* @return {ol.geom.Geometry} MultiPolygon.
*/
ol.format.EsriJSON.readMultiPolygonGeometry_ = function(object) {
goog.DEBUG && console.assert(object.rings.length > 1,
ol.DEBUG && console.assert(object.rings.length > 1,
'object.rings should have length larger than 1');
var layout = ol.format.EsriJSON.getGeometryLayout_(object);
return new ol.geom.MultiPolygon(
@@ -243,7 +243,7 @@ ol.format.EsriJSON.readMultiPolygonGeometry_ = function(object) {
* @return {ol.geom.Geometry} Polygon.
*/
ol.format.EsriJSON.readPolygonGeometry_ = function(object) {
goog.DEBUG && console.assert(object.rings);
ol.DEBUG && console.assert(object.rings);
var layout = ol.format.EsriJSON.getGeometryLayout_(object);
return new ol.geom.Polygon(object.rings, layout);
};
@@ -469,7 +469,7 @@ ol.format.EsriJSON.prototype.readFeatures;
ol.format.EsriJSON.prototype.readFeatureFromObject = function(
object, opt_options) {
var esriJSONFeature = /** @type {EsriJSONFeature} */ (object);
goog.DEBUG && console.assert(esriJSONFeature.geometry ||
ol.DEBUG && console.assert(esriJSONFeature.geometry ||
esriJSONFeature.attributes,
'geometry or attributes should be defined');
var geometry = ol.format.EsriJSON.readGeometry_(esriJSONFeature.geometry,
@@ -481,7 +481,7 @@ ol.format.EsriJSON.prototype.readFeatureFromObject = function(
feature.setGeometry(geometry);
if (opt_options && opt_options.idField &&
esriJSONFeature.attributes[opt_options.idField]) {
goog.DEBUG && console.assert(
ol.DEBUG && console.assert(
typeof esriJSONFeature.attributes[opt_options.idField] === 'number',
'objectIdFieldName value should be a number');
feature.setId(/** @type {number} */(