Open GoogleCodeExporter opened 8 years ago
Added the following to the SVGText Node Line 304 in order to support % based
font for my little project. Would love to see this incorporated for future
updates. Thanks.
if (SVGUnits.getType(fontSize) == SVGUnits.PERCENT) {
fontSizeNum = SVGUnits.parseNumPct(fontSize, this.svgParent.getWidth());
}
Original comment by AbrahamD...@gmail.com
on 25 May 2011 at 4:24
Also added this to SVGUnits.getType to support detection of decimal percentages
} else if (/^\s*[0-9](\.[0-9]{1,2})?+%\s*$/.test(unit)) {
return SVGUnits.PERCENT;
Original comment by AbrahamD...@gmail.com
on 25 May 2011 at 4:43
By the way, the font size routine I added above does not calculate the length
based on the screen diagonal the way is is supposed to. I left it that way
because all my text runs horizontal, but i doubt that is the proper way to do
it. I just wanted to keep my local hacks to a minimum.
Original comment by AbrahamD...@gmail.com
on 25 May 2011 at 4:49
Would be helpful to have this, if you want the text to be centered within a
plot. Say, a box plot.
Original comment by fibinse....@gmail.com
on 30 Oct 2012 at 4:33
Original issue reported on code.google.com by
AbrahamD...@gmail.com
on 25 May 2011 at 3:16