moved oppositeQuadrant() function from Anchored.js to Util.js, where it is now a static function on the OpenLayers.Bounds class. Updated usage in code accordingly. Added test.

git-svn-id: http://svn.openlayers.org/trunk/openlayers@343 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
euzuro
2006-05-25 00:54:45 +00:00
parent cfe9479a89
commit 022ffde95e
3 changed files with 27 additions and 21 deletions

View File

@@ -454,6 +454,22 @@ OpenLayers.Bounds.fromString = function(str) {
};
/**
* @param {String} quadrant
*
* @returns The opposing quadrant ("br" "tr" "tl" "bl"). For Example, if
* you pass in "bl" it returns "tr", if you pass in "br" it
* returns "tl", etc.
* @type String
*/
OpenLayers.Bounds.oppositeQuadrant = function(quadrant) {
var opp = "";
opp += (quadrant.charAt(0) == 't') ? 'b' : 't';
opp += (quadrant.charAt(1) == 'l') ? 'r' : 'l';
return opp;
};
// Some other helpful things