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

@@ -88,7 +88,7 @@ ol.inherits(ol.geom.MultiPolygon, ol.geom.SimpleGeometry);
* @api stable
*/
ol.geom.MultiPolygon.prototype.appendPolygon = function(polygon) {
goog.DEBUG && console.assert(polygon.getLayout() == this.layout,
ol.DEBUG && console.assert(polygon.getLayout() == this.layout,
'layout of polygon should match layout');
/** @type {Array.<number>} */
var ends;
@@ -279,7 +279,7 @@ ol.geom.MultiPolygon.prototype.getSimplifiedGeometryInternal = function(squaredT
* @api stable
*/
ol.geom.MultiPolygon.prototype.getPolygon = function(index) {
goog.DEBUG && console.assert(0 <= index && index < this.endss_.length,
ol.DEBUG && console.assert(0 <= index && index < this.endss_.length,
'index should be in between 0 and the length of this.endss_');
if (index < 0 || this.endss_.length <= index) {
return null;
@@ -389,13 +389,13 @@ ol.geom.MultiPolygon.prototype.setCoordinates = function(coordinates, opt_layout
* @param {Array.<Array.<number>>} endss Endss.
*/
ol.geom.MultiPolygon.prototype.setFlatCoordinates = function(layout, flatCoordinates, endss) {
goog.DEBUG && console.assert(endss, 'endss must be truthy');
ol.DEBUG && console.assert(endss, 'endss must be truthy');
if (!flatCoordinates || flatCoordinates.length === 0) {
goog.DEBUG && console.assert(endss.length === 0, 'the length of endss should be 0');
ol.DEBUG && console.assert(endss.length === 0, 'the length of endss should be 0');
} else {
goog.DEBUG && console.assert(endss.length > 0, 'endss cannot be an empty array');
ol.DEBUG && console.assert(endss.length > 0, 'endss cannot be an empty array');
var ends = endss[endss.length - 1];
goog.DEBUG && console.assert(flatCoordinates.length == ends[ends.length - 1],
ol.DEBUG && console.assert(flatCoordinates.length == ends[ends.length - 1],
'the length of flatCoordinates should be the last value of ends');
}
this.setFlatCoordinatesInternal(layout, flatCoordinates);
@@ -418,7 +418,7 @@ ol.geom.MultiPolygon.prototype.setPolygons = function(polygons) {
layout = polygon.getLayout();
} else {
// FIXME better handle the case of non-matching layouts
goog.DEBUG && console.assert(polygon.getLayout() == layout,
ol.DEBUG && console.assert(polygon.getLayout() == layout,
'layout of polygon should be layout');
}
var offset = flatCoordinates.length;