[OpenLayers-Commits] r5116 - sandbox/camptocamp/text/lib/OpenLayers/Renderer
commits at openlayers.org
commits at openlayers.org
Tue Nov 6 04:08:06 EST 2007
Author: pgiraud
Date: 2007-11-06 04:08:05 -0500 (Tue, 06 Nov 2007)
New Revision: 5116
Modified:
sandbox/camptocamp/text/lib/OpenLayers/Renderer/SVG.js
sandbox/camptocamp/text/lib/OpenLayers/Renderer/VML.js
Log:
prevent label duplication in VML renderer
added some comments
Modified: sandbox/camptocamp/text/lib/OpenLayers/Renderer/SVG.js
===================================================================
--- sandbox/camptocamp/text/lib/OpenLayers/Renderer/SVG.js 2007-11-05 19:40:11 UTC (rev 5115)
+++ sandbox/camptocamp/text/lib/OpenLayers/Renderer/SVG.js 2007-11-06 09:08:05 UTC (rev 5116)
@@ -550,6 +550,8 @@
/* No need to scale Text... */
label.setAttributeNS(null, "transform", "scale(1, -1)");
+
+ // prevent label duplication
if (label.firstChild) {
label.removeChild(label.firstChild);
}
Modified: sandbox/camptocamp/text/lib/OpenLayers/Renderer/VML.js
===================================================================
--- sandbox/camptocamp/text/lib/OpenLayers/Renderer/VML.js 2007-11-05 19:40:11 UTC (rev 5115)
+++ sandbox/camptocamp/text/lib/OpenLayers/Renderer/VML.js 2007-11-06 09:08:05 UTC (rev 5116)
@@ -606,6 +606,11 @@
textbox.appendChild(span);
+ // prevent label duplication
+ if (label.firstChild) {
+ label.removeChild(label.firstChild);
+ }
+
label.appendChild(textbox);
node.parentNode.appendChild(label);
},
More information about the Commits
mailing list