Revision: 496
Author:
ryandesign.com
Date: Wed Sep 18 00:19:44 2013 UTC
Log: adjust dom text for Y-coordinate error in older Graphviz versions
http://code.google.com/p/canviz/source/detail?r=496
Modified:
/canviz/trunk/src/Entity.js
=======================================
--- /canviz/trunk/src/Entity.js Tue Sep 17 23:13:46 2013 UTC
+++ /canviz/trunk/src/Entity.js Wed Sep 18 00:19:44 2013 UTC
@@ -280,7 +280,7 @@
style.position = 'absolute';
style.textAlign = textAlign;
style.textDecoration = decorations.length ?
decorations.join(' ') : 'none';
- style.top = ctxScale * (this.canviz.marginY +
bbScale * (this.canviz.paddingY + (this.canviz.invertY ? this.canviz.height
- baseline : baseline) - getBaseline(fontFamily, fontSize,
style.fontWeight, style.fontStyle))) + 'px';
+ style.top = ctxScale * (this.canviz.marginY +
bbScale * (this.canviz.paddingY + (this.canviz.invertY ? this.canviz.height
- baseline : baseline) - getBaseline(fontFamily, fontSize,
style.fontWeight, style.fontStyle) - yError)) + 'px';
style.width = ctxScale * bbScale * 2 * textWidth
+ 'px';
if (strokeColor.opacity < 1) setOpacity(text,
strokeColor.opacity);
this.canviz.elements.appendChild(text);