diff --git a/unpacked/jax/output/HTML-CSS/autoload/maction.js b/unpacked/jax/output/HTML-CSS/autoload/maction.js index b2232702d..511315df0 100644 --- a/unpacked/jax/output/HTML-CSS/autoload/maction.js +++ b/unpacked/jax/output/HTML-CSS/autoload/maction.js @@ -43,15 +43,19 @@ MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () { HTMLtooltip: HTMLCSS.addElement(document.body,"div",{id:"MathJax_Tooltip"}), toHTML: function (span,HW,D) { - span = this.HTMLhandleSize(this.HTMLcreateSpan(span)); span.bbox = null; var selected = this.selected(); - if (selected.type !== "null") { - var box = selected.toHTML(span); - if (D != null) {HTMLCSS.Remeasured(selected.HTMLstretchV(span,HW,D),span)} - else if (HW != null) {HTMLCSS.Remeasured(selected.HTMLstretchH(span,HW),span)} - else {HTMLCSS.Measured(box,span)} - this.HTMLhandleHitBox(span); + if (selected.type == "null") { + span = this.HTMLcreateSpan(span); + span.bbox = {h:0, d:0, w:0, lw:0, rw:0}; + return span; } + span = this.HTMLhandleSize(this.HTMLcreateSpan(span)); span.bbox = null; + var box = selected.toHTML(span); + if (D != null) {HTMLCSS.Remeasured(selected.HTMLstretchV(span,HW,D),span)} + else if (HW != null) { + HTMLCSS.Remeasured(selected.HTMLstretchH(span,HW),span) + } else {HTMLCSS.Measured(box,span)} + this.HTMLhandleHitBox(span); this.HTMLhandleSpace(span); this.HTMLhandleColor(span); return span; diff --git a/unpacked/jax/output/SVG/autoload/maction.js b/unpacked/jax/output/SVG/autoload/maction.js index 2f7b0cbc2..f587f76b6 100644 --- a/unpacked/jax/output/SVG/autoload/maction.js +++ b/unpacked/jax/output/SVG/autoload/maction.js @@ -46,10 +46,9 @@ MathJax.Hub.Register.StartupHook("SVG Jax Ready",function () { this.SVGgetStyles(); var svg = this.SVG(); var selected = this.selected(); - if (selected.type !== "null") { - svg.Add(this.SVGdataStretched(this.Get("selection")-1,HW,D)); - this.SVGhandleHitBox(svg); - } + if (selected.type == "null") {this.SVGsaveData(svg);return svg;} + svg.Add(this.SVGdataStretched(this.Get("selection")-1,HW,D)); + this.SVGhandleHitBox(svg); this.SVGhandleSpace(svg); this.SVGhandleColor(svg); this.SVGsaveData(svg);