[OpenLayers-Commits] r11879 -
trunk/openlayers/lib/OpenLayers/Renderer
commits-20090109 at openlayers.org
commits-20090109 at openlayers.org
Tue Apr 5 15:27:53 EDT 2011
Author: erilem
Date: 2011-04-05 12:27:52 -0700 (Tue, 05 Apr 2011)
New Revision: 11879
Modified:
trunk/openlayers/lib/OpenLayers/Renderer/SVG2.js
Log:
avoid defining the same variable multiple times, no functional change
Modified: trunk/openlayers/lib/OpenLayers/Renderer/SVG2.js
===================================================================
--- trunk/openlayers/lib/OpenLayers/Renderer/SVG2.js 2011-04-05 19:23:23 UTC (rev 11878)
+++ trunk/openlayers/lib/OpenLayers/Renderer/SVG2.js 2011-04-05 19:27:52 UTC (rev 11879)
@@ -100,14 +100,15 @@
this.rendererRoot.setAttributeNS(null, "height", height / res);
// update styles for the new resolution
+ var i, len;
var nodes = this.vectorRoot.childNodes;
- for (var i=0, len=nodes.length; i<len; ++i) {
+ for (i=0, len=nodes.length; i<len; ++i) {
this.setStyle(nodes[i]);
}
var textNodes = this.textRoot.childNodes;
var label;
- for (var i=0, len=textNodes.length; i<len; ++i) {
- var label = textNodes[i];
+ for (i=0, len=textNodes.length; i<len; ++i) {
+ label = textNodes[i];
this.drawText(label, label._style,
new OpenLayers.Geometry.Point(label._x, label._y)
);
More information about the Commits
mailing list