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:
@@ -154,7 +154,16 @@
|
||||
t.eq( bounds.determineQuadrant(bl), "bl", "bounds.determineQuadrant correctly identifies a coordinate in the bottom left quadrant");
|
||||
t.eq( bounds.determineQuadrant(br), "br", "bounds.determineQuadrant correctly identifies a coordinate in the bottom right quadrant");
|
||||
}
|
||||
|
||||
|
||||
function test_10_Bounds_oppositeQuadrant(t) {
|
||||
|
||||
t.plan( 4 );
|
||||
|
||||
t.eq( OpenLayers.Bounds.oppositeQuadrant("tl"), "br", "OpenLayers.Bounds.oppositeQuadrant returns 'br' for 'tl'");
|
||||
t.eq( OpenLayers.Bounds.oppositeQuadrant("tr"), "bl", "OpenLayers.Bounds.oppositeQuadrant returns 'bl' for 'tr'");
|
||||
t.eq( OpenLayers.Bounds.oppositeQuadrant("bl"), "tr", "OpenLayers.Bounds.oppositeQuadrant returns 'tr' for 'bl'");
|
||||
t.eq( OpenLayers.Bounds.oppositeQuadrant("br"), "tl", "OpenLayers.Bounds.oppositeQuadrant returns 'tl' for 'br'");
|
||||
}
|
||||
// -->
|
||||
</script>
|
||||
</head>
|
||||
|
||||
Reference in New Issue
Block a user