Suport for tooltips on externalGraphics using the graphicTitle
symbolizer property. Only supported in IE and FF. Patch by zspitzer, modified by me (added some docs, moved code that sets the title tag so it gets executed for externalGraphics. p=zspitzer, r=me (closes #1946) git-svn-id: http://svn.openlayers.org/trunk/openlayers@9097 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -250,6 +250,9 @@ OpenLayers.Renderer.SVG = OpenLayers.Class(OpenLayers.Renderer.Elements, {
|
||||
if (style.externalGraphic) {
|
||||
pos = this.getPosition(node);
|
||||
|
||||
if (style.graphicTitle) {
|
||||
node.setAttributeNS(null, "title", style.graphicTitle);
|
||||
}
|
||||
if (style.graphicWidth && style.graphicHeight) {
|
||||
node.setAttributeNS(null, "preserveAspectRatio", "none");
|
||||
}
|
||||
@@ -330,7 +333,7 @@ OpenLayers.Renderer.SVG = OpenLayers.Class(OpenLayers.Renderer.Elements, {
|
||||
if (style.pointerEvents) {
|
||||
node.setAttributeNS(null, "pointer-events", style.pointerEvents);
|
||||
}
|
||||
|
||||
|
||||
if (style.cursor != null) {
|
||||
node.setAttributeNS(null, "cursor", style.cursor);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user