Add equals to Rectangle
This commit is contained in:
@@ -41,6 +41,16 @@ ol.Rectangle = function(minX, minY, maxX, maxY) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {ol.Rectangle} rectangle Rectangle.
|
||||||
|
* @return {boolean} Equals.
|
||||||
|
*/
|
||||||
|
ol.Rectangle.prototype.equals = function(rectangle) {
|
||||||
|
return this.minX == rectangle.minX && this.minY == rectangle.minY &&
|
||||||
|
this.maxX == rectangle.maxX && this.maxY == rectangle.maxY;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {ol.Rectangle} rectangle Rectangle.
|
* @param {ol.Rectangle} rectangle Rectangle.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -61,16 +61,6 @@ ol.TileRange.prototype.containsTileRange = function(tileRange) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param {ol.TileRange} tileRange Tile range.
|
|
||||||
* @return {boolean} Equals.
|
|
||||||
*/
|
|
||||||
ol.TileRange.prototype.equals = function(tileRange) {
|
|
||||||
return this.minX == tileRange.minX && tileRange.maxX == this.maxX &&
|
|
||||||
this.minY == tileRange.minY && tileRange.minY == this.minY;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
* @return {number} Height.
|
* @return {number} Height.
|
||||||
|
|||||||
Reference in New Issue
Block a user