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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user