Cannot switch externalGraphic style on VML-rendered feature. r=tschaub (closes #1312)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@5944 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
ahocevar
2008-01-30 22:43:18 +00:00
parent 894589fe7c
commit 152e48a5a4

View File

@@ -196,28 +196,31 @@ OpenLayers.Renderer.VML = OpenLayers.Class(OpenLayers.Renderer.Elements, {
} else { } else {
if (!fill) { if (!fill) {
fill = this.createNode('v:fill', node.id + "_fill"); fill = this.createNode('v:fill', node.id + "_fill");
}
if (style.fillOpacity) { if (style.fillOpacity) {
fill.setAttribute("opacity", style.fillOpacity); fill.setAttribute("opacity", style.fillOpacity);
}
if (node._geometryClass == "OpenLayers.Geometry.Point" &&
style.externalGraphic) {
// override fillOpacity
if (style.graphicOpacity) {
fill.setAttribute("opacity", style.graphicOpacity);
} }
if (node._geometryClass == "OpenLayers.Geometry.Point" && fill.setAttribute("src", style.externalGraphic);
style.externalGraphic) { fill.setAttribute("type", "frame");
node.style.flip = "y";
// override fillOpacity
if (style.graphicOpacity) { if (!(style.graphicWidth && style.graphicHeight)) {
fill.setAttribute("opacity", style.graphicOpacity); fill.aspect = "atmost";
} }
fill.setAttribute("src", style.externalGraphic); if (fill.parentNode != node) {
fill.setAttribute("type", "frame"); node.appendChild(fill);
node.style.flip = "y";
if (!(style.graphicWidth && style.graphicHeight)) {
fill.aspect = "atmost";
}
} }
node.appendChild(fill);
} }
} }