www

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

commit cd235d5b0e29d001db8f2463785920f3208dc7b7
parent b86a77bee306f02c6423c086f9f64359e0b6ddaa
Author: Davide P. Cervone <dpvc@union.edu>
Date:   Fri, 23 Jan 2015 11:31:17 -0500

Handle background color properly when there is an indentshift.

Diffstat:
Munpacked/jax/output/HTML-CSS/jax.js | 11++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/unpacked/jax/output/HTML-CSS/jax.js b/unpacked/jax/output/HTML-CSS/jax.js @@ -2868,7 +2868,7 @@ // // Add color (if any) // - this.HTMLhandleColor(span); + var color = this.HTMLhandleColor(span); // // Make math span be the correct height and depth // @@ -2896,6 +2896,15 @@ right: {marginLeft: HTMLCSS.Em(Math.max(0,span.bbox.w+shift)), marginRight: HTMLCSS.Em(-shift)}, center: {marginLeft: HTMLCSS.Em(shift), marginRight: HTMLCSS.Em(-shift)} })[values.indentalign]); + // + // Move the background color, of any + // + if (color) { + color.style.marginLeft = HTMLCSS.Em(parseFloat(color.style.marginLeft)+shift); + color.style.marginRight = + HTMLCSS.Em(parseFloat(color.style.marginRight)-shift + + (values.indentalign === "right" ? Math.min(0,span.bbox.w+shift) - span.bbox.w : 0)); + } } } return span;