Add the SVG transform for flipping characters AFTER we have added colors and borders (since they can alter the svg.element, moving it lower in the chain and even removing it). Resolves issue #930.

This commit is contained in:
Davide P. Cervone 2014-12-04 16:56:35 -05:00
parent 142857afa2
commit f6293beea6

View File

@ -2030,12 +2030,13 @@
// Put content in a <g> with defaults and matrix that flips y axis. // Put content in a <g> with defaults and matrix that flips y axis.
// Put that in an <svg> with xlink defined. // Put that in an <svg> with xlink defined.
// //
var box = BBOX.G({ var box = BBOX.G(); box.Add(this.data[0].toSVG(),0,0,true); box.Clean();
this.SVGhandleColor(box);
SVG.Element(box.element,{
stroke:"black", fill:"black", "stroke-width":0, stroke:"black", fill:"black", "stroke-width":0,
transform: "matrix(1 0 0 -1 0 0)" transform: "matrix(1 0 0 -1 0 0)"
}).With({removeable: false}); });
box.Add(this.data[0].toSVG(),0,0,true); box.Clean(); box.removeable = false;
this.SVGhandleColor(box);
var svg = this.SVG(); var svg = this.SVG();
svg.element.setAttribute("xmlns:xlink",XLINKNS); svg.element.setAttribute("xmlns:xlink",XLINKNS);
if (CONFIG.useFontCache && !CONFIG.useGlobalCache) if (CONFIG.useFontCache && !CONFIG.useGlobalCache)