Actually set the height of the under- or over-script when baseline spacing is not wanted, and make sure the proper node type is created for mover.
This commit is contained in:
parent
0ba42d10b0
commit
b8ae3b9817
|
@ -63,7 +63,6 @@
|
||||||
"mjx-base": {display:"block"},
|
"mjx-base": {display:"block"},
|
||||||
"mjx-under": {display:"table-cell"},
|
"mjx-under": {display:"table-cell"},
|
||||||
"mjx-over": {display:"block"},
|
"mjx-over": {display:"block"},
|
||||||
"mjx-table > mjxover": {display:"table-cell"},
|
|
||||||
|
|
||||||
"mjx-mphantom": {"visibility":"hidden"},
|
"mjx-mphantom": {"visibility":"hidden"},
|
||||||
|
|
||||||
|
@ -1018,9 +1017,10 @@
|
||||||
//
|
//
|
||||||
// Get the nodes for base and limits
|
// Get the nodes for base and limits
|
||||||
//
|
//
|
||||||
|
var types = ["mjx-base","mjx-under","mjx-over"];
|
||||||
|
if (this.over === 1) types[1] = types[2];
|
||||||
node = this.CHTMLdefaultNode(node,{
|
node = this.CHTMLdefaultNode(node,{
|
||||||
childNodes:["mjx-base","mjx-under","mjx-over"], noBBox:true, forceChild:true,
|
childNodes:types, noBBox:true, forceChild:true, minChildren: 2
|
||||||
minChildren: 2
|
|
||||||
});
|
});
|
||||||
var base, under, over;
|
var base, under, over;
|
||||||
base = node.removeChild(node.firstChild);
|
base = node.removeChild(node.firstChild);
|
||||||
|
@ -1116,13 +1116,13 @@
|
||||||
//
|
//
|
||||||
var stack = HTML.Element("mjx-stack");
|
var stack = HTML.Element("mjx-stack");
|
||||||
stack.appendChild(over); stack.appendChild(base);
|
stack.appendChild(over); stack.appendChild(base);
|
||||||
if (obox.d < 0) {
|
if (obox.d < 0 || obox.h < .25) {
|
||||||
//
|
//
|
||||||
// For negative depths, set the height and align to top
|
// For negative depths, set the height and align to top
|
||||||
// in order to avoid extra baseline space
|
// in order to avoid extra baseline space
|
||||||
//
|
//
|
||||||
over.firstChild.style.verticalAlign = "top";
|
over.firstChild.style.verticalAlign = "top";
|
||||||
over.style.height = obox.h+obox.d;
|
over.style.height = CHTML.Em(obox.h+obox.d);
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
// Determine the spacing
|
// Determine the spacing
|
||||||
|
@ -1165,13 +1165,13 @@
|
||||||
]);
|
]);
|
||||||
node.firstChild.firstChild.firstChild.appendChild(stack);
|
node.firstChild.firstChild.firstChild.appendChild(stack);
|
||||||
node.firstChild.lastChild.appendChild(under);
|
node.firstChild.lastChild.appendChild(under);
|
||||||
if (ubox.d < 0) {
|
if (ubox.d < 0 || ubox.h < .25) {
|
||||||
//
|
//
|
||||||
// For negative depths, set the height and align to top
|
// For negative depths, set the height and align to top
|
||||||
// in order to avoid extra baseline space
|
// in order to avoid extra baseline space
|
||||||
//
|
//
|
||||||
under.firstChild.style.verticalAlign = "top";
|
under.firstChild.style.verticalAlign = "top";
|
||||||
under.style.height = ubox.h+ubox.d;
|
under.style.height = CHTML.Em(ubox.h+ubox.d);
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
// determine the spacing
|
// determine the spacing
|
||||||
|
|
Loading…
Reference in New Issue
Block a user