align toString and fromString methods. r=erilem (closes #1275)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11755 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -121,11 +121,9 @@ OpenLayers.Bounds = OpenLayers.Class({
|
||||
*
|
||||
* Returns:
|
||||
* {String} String representation of bounds object.
|
||||
* (ex.<i>"left-bottom=(5,42) right-top=(10,45)"</i>)
|
||||
*/
|
||||
toString:function() {
|
||||
return ( "left-bottom=(" + this.left + "," + this.bottom + ")"
|
||||
+ " right-top=(" + this.right + "," + this.top + ")" );
|
||||
return [this.left, this.bottom, this.right, this.top].join(",");
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
function test_Bounds_toString(t) {
|
||||
t.plan( 1 );
|
||||
bounds = new OpenLayers.Bounds(1,2,3,4);
|
||||
t.eq( bounds.toString(), "left-bottom=(1,2) right-top=(3,4)", "toString() returns correct value." );
|
||||
t.eq( bounds.toString(), "1,2,3,4", "toString() returns correct value." );
|
||||
}
|
||||
function test_Bounds_toArray(t) {
|
||||
t.plan( 1 );
|
||||
|
||||
Reference in New Issue
Block a user