[OpenLayers-Commits] r11755 - in trunk/openlayers:
lib/OpenLayers/BaseTypes tests/BaseTypes
commits-20090109 at openlayers.org
commits-20090109 at openlayers.org
Tue Mar 29 13:07:59 EDT 2011
Author: fredj
Date: 2011-03-29 10:07:54 -0700 (Tue, 29 Mar 2011)
New Revision: 11755
Modified:
trunk/openlayers/lib/OpenLayers/BaseTypes/Bounds.js
trunk/openlayers/tests/BaseTypes/Bounds.html
Log:
align toString and fromString methods. r=erilem (closes #1275)
Modified: trunk/openlayers/lib/OpenLayers/BaseTypes/Bounds.js
===================================================================
--- trunk/openlayers/lib/OpenLayers/BaseTypes/Bounds.js 2011-03-29 15:27:09 UTC (rev 11754)
+++ trunk/openlayers/lib/OpenLayers/BaseTypes/Bounds.js 2011-03-29 17:07:54 UTC (rev 11755)
@@ -121,11 +121,9 @@
*
* 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(",");
},
/**
Modified: trunk/openlayers/tests/BaseTypes/Bounds.html
===================================================================
--- trunk/openlayers/tests/BaseTypes/Bounds.html 2011-03-29 15:27:09 UTC (rev 11754)
+++ trunk/openlayers/tests/BaseTypes/Bounds.html 2011-03-29 17:07:54 UTC (rev 11755)
@@ -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 );
More information about the Commits
mailing list