Make lspace and voffset handle bad unit better in SVG (corresponding correction to HTML-CSS is 6e8ff20e07). Resolves issue #191 for SVG

This commit is contained in:
Davide P. Cervone 2012-02-08 16:15:24 -05:00
parent fe8c5b9899
commit ac512fd1a7
3 changed files with 3 additions and 3 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1459,7 +1459,7 @@
SVGlength2em: function (svg,length,mu,d,m) {
if (m == null) {m = -SVG.BIGDIMEN}
var match = String(length).match(/width|height|depth/);
var size = (match ? svg[match[0].charAt(0)] : (d ? svg[d] : null));
var size = (match ? svg[match[0].charAt(0)] : (d ? svg[d] : 0));
var v = SVG.length2em(length,mu,size);
if (d && String(length).match(/^\s*[-+]/))
{return Math.max(m,svg[d]+v)} else {return v}