Rename style.graphicTitle to style.title (the former is now deprecated)
This commit is contained in:
@@ -240,16 +240,17 @@ OpenLayers.Renderer.SVG = OpenLayers.Class(OpenLayers.Renderer.Elements, {
|
||||
style = style || node._style;
|
||||
options = options || node._options;
|
||||
|
||||
if (style.graphicTitle) {
|
||||
node.setAttributeNS(null, "title", style.graphicTitle);
|
||||
var title = style.title || style.graphicTitle;
|
||||
if (title) {
|
||||
node.setAttributeNS(null, "title", title);
|
||||
//Standards-conformant SVG
|
||||
// Prevent duplicate nodes. See issue https://github.com/openlayers/openlayers/issues/92
|
||||
var titleNode = node.getElementsByTagName("title");
|
||||
if (titleNode.length > 0) {
|
||||
titleNode[0].firstChild.textContent = style.graphicTitle;
|
||||
titleNode[0].firstChild.textContent = title;
|
||||
} else {
|
||||
var label = this.nodeFactory(null, "title");
|
||||
label.textContent = style.graphicTitle;
|
||||
label.textContent = title;
|
||||
node.appendChild(label);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user