Add ol.Rectangle.isEmpty
This commit is contained in:
@@ -104,6 +104,14 @@ ol.Rectangle.prototype.intersects = function(rectangle) {
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @return {boolean} Is empty.
|
||||
*/
|
||||
ol.Rectangle.prototype.isEmpty = function() {
|
||||
return this.maxX < this.minX || this.maxY < this.minY;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.Coordinate} coordinate Coordinate.
|
||||
* @return {ol.Coordinate} Coordinate.
|
||||
|
||||
Reference in New Issue
Block a user