-
Notifications
You must be signed in to change notification settings - Fork 528
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
text-dx, text-dy documentation inaccurate #2310
Comments
Thanks a ton for digging into this. I agree that this doc is not representative of all placement types and needs improvement. Want to queue up a pull request to https://github.com/mapnik/mapnik-reference fixing things? The doc is coming from right here: https://github.com/mapnik/mapnik-reference/blob/ffdce231df9b06f0df48bb27b1ecb1aa6f01ad18/latest/reference.json#L1747-L1758 |
Ok, done. I confirmed with testing that any non-zero value of text-dx changes the default behaviour of text-horizontal-alignment. |
@wheredoesyourmindgo awesome, thanks for helping figure this out. The right place to improve the docs is by editing the entry in |
I'd be happy to @springmeyer . I'll toy with all this some more so I have a better understanding of how these properties effect one another; Admittingly I just kinda' hacked my way through all this with little understanding of what was taking place. I think the main thing to point out is that text-dy/text-dx are effected by other properties, which contrasts a bit with SVG transforms such as translate used with marker-transform and the like which seem to behave/operate a bit more independently. |
The documentation for text-dx says: "Displace text by fixed amount, in pixels, +/- along the X axis. A positive value will shift the text right", and text-dy is "Displace text by fixed amount, in pixels, +/- along the Y axis. A positive value will shift the text down"
I don't think this is the full picture. Specifically:
So I think a more accurate statement would be something like:
and for text-dy:
The text was updated successfully, but these errors were encountered: