Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Baseline support #12

Merged
merged 3 commits into from
Sep 20, 2014
Merged

Baseline support #12

merged 3 commits into from
Sep 20, 2014

Conversation

KoKuToru
Copy link
Contributor

#9

//helper function to map canvas-textBaseline to svg-dominantBaseline
function getDominantBaseline(textBaseline) {
//INFO: not supported in all browsers
var mapping = {"alphabetic": "alphabetic", "hanging": "hanging", "top":"text-before-edge", "bottom":"text-after-edge", "middle":"central"};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Default text align value in canvas is "alphabetic":

return mapping[textBaseline] || mapping.alphabetic;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy & past .. + I didn't test for default baseline..

Changed default to alphabetic
@gwwar
Copy link
Contributor

gwwar commented Sep 18, 2014

Looks good. I'll add in some additional tests and try to do the merge this weekend

@gwwar gwwar merged commit 0393936 into gliffy:master Sep 20, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants