commit 9e65b9ce749f5d37ca73fefddbe4515e6cedbdbf
parent 486cd40424abbb97e1a942b3fc2ae9c4e99dc64c
Author: Davide P. Cervone <dpvc@union.edu>
Date: Fri, 19 Apr 2013 08:08:59 -0400
Move mjx-svg-href class to <a> rather than its child. Resolves issue #427.
Diffstat:
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/unpacked/jax/output/SVG/jax.js b/unpacked/jax/output/SVG/jax.js
@@ -1018,7 +1018,7 @@
// FIXME: if an element has an id, its zoomed copy will have the same ID
if (this.id) {svg.removeable = false; SVG.Element(svg.element,{"id":this.id})}
if (this.href) {
- var a = SVG.Element("a");
+ var a = SVG.Element("a",{"class":"mjx-svg-href"});
a.setAttributeNS(XLINKNS,"href",this.href);
a.onclick = this.SVGlink;
SVG.addElement(a,"rect",{width:svg.w, height:svg.h+svg.d, y:-svg.d,
@@ -1027,10 +1027,8 @@
// for svg element, put <a> inside the main <g> element
var g = svg.element.firstChild;
while (g.firstChild) {a.appendChild(g.firstChild)}
- g.appendChild(a); this.SVGaddClass(g,"mjx-svg-href");
- g.removeAttribute("fill"); g.removeAttribute("stroke");
+ g.appendChild(a);
} else {
- this.SVGaddClass(svg.element,"mjx-svg-href");
a.appendChild(svg.element); svg.element = a;
}
svg.removeable = false;