Remove ol.DEBUG

This commit is contained in:
Tim Schaub
2016-12-29 09:09:24 -07:00
parent 7b9690a691
commit 137cdc04c8
128 changed files with 309 additions and 2027 deletions

View File

@@ -100,8 +100,6 @@ ol.interaction.DragAndDrop.prototype.handleResult_ = function(file, event) {
if (!projection) {
var view = map.getView();
projection = view.getProjection();
ol.DEBUG && console.assert(projection !== undefined,
'projection should be defined');
}
var formatConstructors = this.formatConstructors_;
var features = [];

View File

@@ -62,8 +62,6 @@ ol.inherits(ol.interaction.DragPan, ol.interaction.Pointer);
* @private
*/
ol.interaction.DragPan.handleDragEvent_ = function(mapBrowserEvent) {
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);
if (this.kinetic_) {

View File

@@ -476,7 +476,6 @@ ol.interaction.Draw.prototype.startDrawing_ = function(event) {
new ol.geom.LineString(this.sketchLineCoords_));
}
var geometry = this.geometryFunction_(this.sketchCoords_);
ol.DEBUG && console.assert(geometry !== undefined, 'geometry should be defined');
this.sketchFeature_ = new ol.Feature();
if (this.geometryName_) {
this.sketchFeature_.setGeometryName(this.geometryName_);
@@ -512,7 +511,6 @@ ol.interaction.Draw.prototype.modifyDrawing_ = function(event) {
}
last[0] = coordinate[0];
last[1] = coordinate[1];
ol.DEBUG && console.assert(this.sketchCoords_, 'sketchCoords_ expected');
this.geometryFunction_(
/** @type {!ol.Coordinate|!Array.<ol.Coordinate>|!Array.<Array.<ol.Coordinate>>} */ (this.sketchCoords_),
geometry);
@@ -680,10 +678,6 @@ ol.interaction.Draw.prototype.abortDrawing_ = function() {
*/
ol.interaction.Draw.prototype.extend = function(feature) {
var geometry = feature.getGeometry();
ol.DEBUG && console.assert(this.mode_ == ol.interaction.Draw.Mode_.LINE_STRING,
'interaction mode must be "line"');
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;
this.sketchCoords_ = lineString.getCoordinates();

View File

@@ -931,8 +931,6 @@ ol.interaction.Modify.prototype.removeVertex_ = function() {
segments.push(right.segment[1]);
}
if (left !== undefined && right !== undefined) {
ol.DEBUG && console.assert(newIndex >= 0, 'newIndex should be larger than 0');
var newSegmentData = /** @type {ol.ModifySegmentDataType} */ ({
depth: segmentData.depth,
feature: segmentData.feature,

View File

@@ -73,8 +73,6 @@ ol.inherits(ol.interaction.PinchRotate, ol.interaction.Pointer);
* @private
*/
ol.interaction.PinchRotate.handleDragEvent_ = function(mapBrowserEvent) {
ol.DEBUG && console.assert(this.targetPointers.length >= 2,
'length of this.targetPointers should be greater than or equal to 2');
var rotationDelta = 0.0;
var touch0 = this.targetPointers[0];

View File

@@ -67,8 +67,6 @@ ol.inherits(ol.interaction.PinchZoom, ol.interaction.Pointer);
* @private
*/
ol.interaction.PinchZoom.handleDragEvent_ = function(mapBrowserEvent) {
ol.DEBUG && console.assert(this.targetPointers.length >= 2,
'length of this.targetPointers should be 2 or more');
var scaleDelta = 1.0;
var touch0 = this.targetPointers[0];
@@ -102,7 +100,6 @@ ol.interaction.PinchZoom.handleDragEvent_ = function(mapBrowserEvent) {
map.render();
ol.interaction.Interaction.zoomWithoutConstraints(
map, view, resolution * scaleDelta, this.anchor_);
};