Skip to content

Commit

Permalink
textBaseline experiment
Browse files Browse the repository at this point in the history
Signed-off-by: Luca Béla Palkovics <luca.bela.palkovics@gmail.com>
  • Loading branch information
KoKuToru committed Sep 13, 2014
1 parent 1aa1d69 commit 5031052
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion canvas2svg.js
Expand Up @@ -747,7 +747,8 @@
"text-decoration" : font.decoration,
"x" : x,
"y" : y,
"text-anchor": this.textAlign.replace("left", "start").replace("right", "end").replace("center", "middle")
"text-anchor": this.textAlign.replace("left", "start").replace("right", "end").replace("center", "middle"),
"dominant-baseline": this.textBaseline.replace("top", "text-after-edge").replace("top", "text-before-edge") //not 100% right + wont work in IE
}, true);

textElement.appendChild(document.createTextNode(text));
Expand Down

0 comments on commit 5031052

Please sign in to comment.