add equals() function to OpenLayers.Bounds. plus test
git-svn-id: http://svn.openlayers.org/trunk/openlayers@389 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -267,6 +267,18 @@ OpenLayers.Bounds.prototype = {
|
||||
this.right, this.top);
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {OpenLayers.Bounds} bounds
|
||||
* @returns Boolean value indicating whether the passed-in OpenLayers.Bounds
|
||||
* object has the same left, right, top, bottom components as this
|
||||
*
|
||||
* @type bool
|
||||
*/
|
||||
equals:function(bounds) {
|
||||
return ((this.left == bounds.left) && (this.right == bounds.right) &&
|
||||
(this.top == bounds.top) && (this.bottom == bounds.bottom));
|
||||
},
|
||||
|
||||
/**
|
||||
* @return String representation of OpenLayers.Bounds object.
|
||||
* (ex.<i>"left-bottom=(5,42) right-top=(10,45)"</i>)
|
||||
|
||||
Reference in New Issue
Block a user