Add ol.Rectangle.isEmpty

This commit is contained in:
Tom Payne
2013-03-19 17:21:15 +01:00
parent 0488612449
commit 5186fa44f5

View File

@@ -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.