www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit e3f1a68bbef1b87ee6fb106faba19b1717616928
parent 6b73beacd5142f4dbb233fe47d5ce5a394c005a7
Author: Davide P. Cervone <dpvc@union.edu>
Date:   Tue, 28 Apr 2015 18:26:49 -0400

Make sure that paths with scale() transforms retain the scaling when they are translated.  Issue #1176 and mathjax/MathJax-node#93.

Diffstat:
Munpacked/jax/output/SVG/jax.js | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/unpacked/jax/output/SVG/jax.js b/unpacked/jax/output/SVG/jax.js @@ -866,7 +866,10 @@ else {svg.element.setAttribute("transform","translate("+Math.floor(svg.x)+","+Math.floor(svg.y)+")")} } else if (nodeName === "line" || nodeName === "polygon" || nodeName === "path" || nodeName === "a") { - svg.element.setAttribute("transform","translate("+Math.floor(svg.x)+","+Math.floor(svg.y)+")"); + var transform = svg.element.getAttribute("transform"); + if (transform) transform = " "+transform; + transform = "translate("+Math.floor(svg.x)+","+Math.floor(svg.y)+") "+transform; + svg.element.setAttribute("transform",transform); } else { svg.element.setAttribute("x",Math.floor(svg.x/svg.scale)); svg.element.setAttribute("y",Math.floor(svg.y/svg.scale));