Rename goog.DEBUG to ol.DEBUG
This commit is contained in:
@@ -101,7 +101,7 @@ ol.interaction.DragAndDrop.prototype.handleResult_ = function(file, event) {
|
||||
if (!projection) {
|
||||
var view = map.getView();
|
||||
projection = view.getProjection();
|
||||
goog.DEBUG && console.assert(projection !== undefined,
|
||||
ol.DEBUG && console.assert(projection !== undefined,
|
||||
'projection should be defined');
|
||||
}
|
||||
var formatConstructors = this.formatConstructors_;
|
||||
|
||||
@@ -67,7 +67,7 @@ ol.inherits(ol.interaction.DragPan, ol.interaction.Pointer);
|
||||
* @private
|
||||
*/
|
||||
ol.interaction.DragPan.handleDragEvent_ = function(mapBrowserEvent) {
|
||||
goog.DEBUG && console.assert(this.targetPointers.length >= 1,
|
||||
ol.DEBUG && console.assert(this.targetPointers.length >= 1,
|
||||
'the length of this.targetPointers should be more than 1');
|
||||
var centroid =
|
||||
ol.interaction.Pointer.centroid(this.targetPointers);
|
||||
|
||||
@@ -514,7 +514,7 @@ ol.interaction.Draw.prototype.startDrawing_ = function(event) {
|
||||
new ol.geom.LineString(this.sketchLineCoords_));
|
||||
}
|
||||
var geometry = this.geometryFunction_(this.sketchCoords_);
|
||||
goog.DEBUG && console.assert(geometry !== undefined, 'geometry should be defined');
|
||||
ol.DEBUG && console.assert(geometry !== undefined, 'geometry should be defined');
|
||||
this.sketchFeature_ = new ol.Feature();
|
||||
if (this.geometryName_) {
|
||||
this.sketchFeature_.setGeometryName(this.geometryName_);
|
||||
@@ -550,7 +550,7 @@ ol.interaction.Draw.prototype.modifyDrawing_ = function(event) {
|
||||
}
|
||||
last[0] = coordinate[0];
|
||||
last[1] = coordinate[1];
|
||||
goog.DEBUG && console.assert(this.sketchCoords_, 'sketchCoords_ expected');
|
||||
ol.DEBUG && console.assert(this.sketchCoords_, 'sketchCoords_ expected');
|
||||
this.geometryFunction_(
|
||||
/** @type {!ol.Coordinate|!Array.<ol.Coordinate>|!Array.<Array.<ol.Coordinate>>} */ (this.sketchCoords_),
|
||||
geometry);
|
||||
@@ -708,9 +708,9 @@ ol.interaction.Draw.prototype.abortDrawing_ = function() {
|
||||
*/
|
||||
ol.interaction.Draw.prototype.extend = function(feature) {
|
||||
var geometry = feature.getGeometry();
|
||||
goog.DEBUG && console.assert(this.mode_ == ol.interaction.DrawMode.LINE_STRING,
|
||||
ol.DEBUG && console.assert(this.mode_ == ol.interaction.DrawMode.LINE_STRING,
|
||||
'interaction mode must be "line"');
|
||||
goog.DEBUG && console.assert(geometry.getType() == ol.geom.GeometryType.LINE_STRING,
|
||||
ol.DEBUG && console.assert(geometry.getType() == ol.geom.GeometryType.LINE_STRING,
|
||||
'feature geometry must be a line string');
|
||||
var lineString = /** @type {ol.geom.LineString} */ (geometry);
|
||||
this.sketchFeature_ = feature;
|
||||
|
||||
@@ -975,7 +975,7 @@ ol.interaction.Modify.prototype.removeVertex_ = function() {
|
||||
segments.push(right.segment[1]);
|
||||
}
|
||||
if (left !== undefined && right !== undefined) {
|
||||
goog.DEBUG && console.assert(newIndex >= 0, 'newIndex should be larger than 0');
|
||||
ol.DEBUG && console.assert(newIndex >= 0, 'newIndex should be larger than 0');
|
||||
|
||||
var newSegmentData = /** @type {ol.ModifySegmentDataType} */ ({
|
||||
depth: segmentData.depth,
|
||||
|
||||
@@ -73,7 +73,7 @@ ol.inherits(ol.interaction.PinchRotate, ol.interaction.Pointer);
|
||||
* @private
|
||||
*/
|
||||
ol.interaction.PinchRotate.handleDragEvent_ = function(mapBrowserEvent) {
|
||||
goog.DEBUG && console.assert(this.targetPointers.length >= 2,
|
||||
ol.DEBUG && console.assert(this.targetPointers.length >= 2,
|
||||
'length of this.targetPointers should be greater than or equal to 2');
|
||||
var rotationDelta = 0.0;
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ ol.inherits(ol.interaction.PinchZoom, ol.interaction.Pointer);
|
||||
* @private
|
||||
*/
|
||||
ol.interaction.PinchZoom.handleDragEvent_ = function(mapBrowserEvent) {
|
||||
goog.DEBUG && console.assert(this.targetPointers.length >= 2,
|
||||
ol.DEBUG && console.assert(this.targetPointers.length >= 2,
|
||||
'length of this.targetPointers should be 2 or more');
|
||||
var scaleDelta = 1.0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user