www

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

commit a911742bd280443143281c81d4e5d669b9b5a0d5
parent e47e221afad08727072eb7c9cf9d4f6da75d6f83
Author: Davide P. Cervone <dpvc@union.edu>
Date:   Fri,  4 Dec 2015 14:37:47 -0500

Merge branch 'issue1324' into develop.  Issue #1324.

Diffstat:
Munpacked/extensions/MathMenu.js | 20+++++++++++++-------
1 file changed, 13 insertions(+), 7 deletions(-)

diff --git a/unpacked/extensions/MathMenu.js b/unpacked/extensions/MathMenu.js @@ -1213,19 +1213,25 @@ * Handle rescaling all the math */ MENU.Scale = function () { - var HTMLCSS = OUTPUT["HTML-CSS"], nMML = OUTPUT.NativeMML, SVG = OUTPUT.SVG; - var SCALE = (HTMLCSS||nMML||SVG||{config:{scale:100}}).config.scale; + var JAX = ["CommonHTML","HTML-CSS","SVG","NativeMML","PreviewHTML"], m = JAX.length, + SCALE = 100, i, jax; + for (i = 0; i < m; i++) { + jax = OUTPUT[JAX[i]]; + if (jax) {SCALE = jax.config.scale; break} + } var scale = prompt(_("ScaleMath","Scale all mathematics (compared to surrounding text) by"),SCALE+"%"); if (scale) { if (scale.match(/^\s*\d+(\.\d*)?\s*%?\s*$/)) { scale = parseFloat(scale); if (scale) { if (scale !== SCALE) { - if (HTMLCSS) {HTMLCSS.config.scale = scale} - if (nMML) {nMML.config.scale = scale} - if (SVG) {SVG.config.scale = scale} - MENU.cookie.scale = scale; - MENU.saveCookie(); HUB.Rerender(); + for (i = 0; i < m; i++) { + jax = OUTPUT[JAX[i]]; + if (jax) jax.config.scale = scale; + } + MENU.cookie.scale = HUB.config.scale = scale; + MENU.saveCookie(); + HUB.Queue(["Rerender",HUB]); } } else {alert(_("NonZeroScale","The scale should not be zero"))} } else {alert(_("PercentScale",