Skip to content

Commit fe68969

Browse files
committed
Merge branch 'issue824' into v2.4-beta. Issue #824.
2 parents ae31979 + b84f777 commit fe68969

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

unpacked/jax/output/HTML-CSS/jax.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -777,15 +777,18 @@
777777
this.idPostfix = "-zoom"; jax.root.toHTML(span,span); this.idPostfix = "";
778778
this.zoomScale = 1;
779779

780-
var width = jax.root.HTMLspanElement().bbox.width;
780+
var width = jax.root.HTMLspanElement().bbox.width, cwidth;
781781
if (width) {
782782
// Handle full-width displayed equations
783783
// FIXME: this is a hack for now
784784
span.style.width = Math.floor(Mw-1.5*HTMLCSS.em)+"px"; span.style.display="inline-block";
785785
var id = (jax.root.id||"MathJax-Span-"+jax.root.spanID)+"-zoom";
786786
var child = document.getElementById(id).firstChild;
787787
while (child && child.style.width !== width) {child = child.nextSibling}
788-
if (child) {child.style.width = "100%"}
788+
if (child) {
789+
var cwidth = child.offsetWidth; child.style.width = "100%";
790+
if (cwidth > Mw) {span.style.width = (cwidth+100)+"px"}
791+
}
789792
}
790793
//
791794
// Get height and width of zoomed math and original math

unpacked/jax/output/NativeMML/jax.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -432,6 +432,7 @@
432432
Zoom: function (jax,span,math,Mw,Mh) {
433433
jax.root.toNativeMML(span);
434434
if (this.msieIE8HeightBug) {span.style.position = "absolute"}
435+
if (nMML.widthBug) {span.style.width = span.parentNode.style.width = ""}
435436
var mW = math.offsetWidth || math.scrollWidth,
436437
mH = math.offsetHeight || math.scrollHeight;
437438
var zW = span.offsetWidth, zH = span.offsetHeight;

0 commit comments

Comments
 (0)