www

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

commit 4fefa49080ac88ce679ce4f9b30d0fa65a079105
parent 07c5ee11217e725fe501f336dcf43c7b5add47b3
Author: Frédéric Wang <fred.wang@free.fr>
Date:   Fri,  8 Feb 2013 16:32:24 +0100

Do not display maction when the selection is out of range. Fix issue 365.

Diffstat:
Munpacked/jax/output/HTML-CSS/autoload/maction.js | 4+++-
Munpacked/jax/output/SVG/autoload/maction.js | 4+++-
2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/unpacked/jax/output/HTML-CSS/autoload/maction.js b/unpacked/jax/output/HTML-CSS/autoload/maction.js @@ -1,3 +1,5 @@ +/* -*- Mode: Javascript; indent-tabs-mode:nil; js-indent-level: 2 -*- */ +/* vim: set ts=2 et sw=2 tw=80: */ /************************************************************* * * MathJax/jax/output/HTML-CSS/autoload/maction.js @@ -43,7 +45,7 @@ MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () { toHTML: function (span,HW,D) { span = this.HTMLhandleSize(this.HTMLcreateSpan(span)); span.bbox = null; var selected = this.selected(); - if (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)} diff --git a/unpacked/jax/output/SVG/autoload/maction.js b/unpacked/jax/output/SVG/autoload/maction.js @@ -1,3 +1,5 @@ +/* -*- Mode: Javascript; indent-tabs-mode:nil; js-indent-level: 2 -*- */ +/* vim: set ts=2 et sw=2 tw=80: */ /************************************************************* * * MathJax/jax/output/SVG/autoload/maction.js @@ -44,7 +46,7 @@ MathJax.Hub.Register.StartupHook("SVG Jax Ready",function () { this.SVGgetStyles(); var svg = this.SVG(); var selected = this.selected(); - if (selected) { + if (selected.type !== "null") { svg.Add(this.SVGdataStretched(this.Get("selection")-1,HW,D)); this.SVGhandleHitBox(svg); }