From b7385f44d2b3bad9a1b82fde1fe7e2622948bd5d Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Fri, 29 Apr 2016 10:32:23 -0400 Subject: [PATCH] Fix problem with container width in SVG when math is scaled. Resolves issue #1422. --- unpacked/jax/output/SVG/jax.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unpacked/jax/output/SVG/jax.js b/unpacked/jax/output/SVG/jax.js index ea221f1d7..3970d7048 100644 --- a/unpacked/jax/output/SVG/jax.js +++ b/unpacked/jax/output/SVG/jax.js @@ -249,7 +249,7 @@ test = script.previousSibling; div = test.previousSibling; jax = script.MathJax.elementJax; if (!jax) continue; ex = test.firstChild.offsetHeight/60; - cwidth = div.previousSibling.firstChild.offsetWidth; + cwidth = div.previousSibling.firstChild.offsetWidth / this.config.scale * 100; if (relwidth) {maxwidth = cwidth} if (ex === 0 || ex === "NaN") { // can't read width, so move to hidden div for processing