From 27d3b1ea80d52d8809427ab757ac40b5f8b2b1eb Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Sat, 8 Sep 2012 11:14:06 -0400 Subject: [PATCH] Force Opera to redraw zoomed expressions in SVG output. Resolves issue #309. --- unpacked/jax/output/SVG/config.js | 2 +- unpacked/jax/output/SVG/jax.js | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/unpacked/jax/output/SVG/config.js b/unpacked/jax/output/SVG/config.js index 90c8942b4..7ca47323d 100644 --- a/unpacked/jax/output/SVG/config.js +++ b/unpacked/jax/output/SVG/config.js @@ -24,7 +24,7 @@ MathJax.OutputJax.SVG = MathJax.OutputJax({ id: "SVG", - version: "2.0.11", + version: "2.0.12", directory: MathJax.OutputJax.directory + "/SVG", extensionDir: MathJax.OutputJax.extensionDir + "/SVG", autoloadDir: MathJax.OutputJax.directory + "/SVG/autoload", diff --git a/unpacked/jax/output/SVG/jax.js b/unpacked/jax/output/SVG/jax.js index 25bbe138c..f88a9fc2d 100644 --- a/unpacked/jax/output/SVG/jax.js +++ b/unpacked/jax/output/SVG/jax.js @@ -386,6 +386,8 @@ emex.parentNode.removeChild(emex); this.idPostfix = "-zoom"; jax.root.toSVG(span,span); this.idPostfix = ""; + if (this.operaZoomRefresh) + {setTimeout(function () {span.firstChild.style.border="1px solid transparent"},1)} // // Get height and width of zoomed math and original math // @@ -1960,6 +1962,14 @@ }); }); + HUB.Browser.Select({ + Opera: function (browser) { + SVG.Augment({ + operaZoomRefresh: true // Opera needs a kick to redraw zoomed equations + }); + } + }); + HUB.Register.StartupHook("End Cookie", function () { if (HUB.config.menuSettings.zoom !== "None") {AJAX.Require("[MathJax]/extensions/MathZoom.js")}