File tree 1 file changed +4
-2
lines changed
unpacked/jax/output/HTML-CSS
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 1007
1007
return m . toFixed ( 3 ) . replace ( / \. ? 0 + $ / , "" ) + "em" ;
1008
1008
} ,
1009
1009
EmRounded : function ( m ) {
1010
- m = ( Math . round ( m * HTMLCSS . em ) + .05 ) / HTMLCSS . em ;
1011
1010
if ( Math . abs ( m ) < .0006 ) { return "0em" }
1011
+ m = ( Math . round ( m * HTMLCSS . em ) + .05 ) / HTMLCSS . em ;
1012
1012
return m . toFixed ( 3 ) . replace ( / \. ? 0 + $ / , "" ) + "em" ;
1013
1013
} ,
1014
1014
unEm : function ( m ) {
2936
2936
// Add the width to the span (outside the MathJax class, so uses outer em size,
2937
2937
// which makes it work even when minimum font size is in effect).
2938
2938
//
2939
- span . style . width = HTMLCSS . Em ( Math . max ( 0 , Math . round ( math . bbox . w * this . em ) + .25 ) / HTMLCSS . outerEm ) ;
2939
+ var W = math . bbox . w ;
2940
+ W = Math . abs ( W ) < .006 ? 0 : Math . max ( 0 , Math . round ( W * this . em ) + .25 ) ;
2941
+ span . style . width = HTMLCSS . EmRounded ( W / HTMLCSS . outerEm ) ;
2940
2942
span . style . display = "inline-block" ;
2941
2943
//
2942
2944
// Adjust bbox to match outer em-size
You can’t perform that action at this time.
0 commit comments