[rotation] prevent rotation of labels when placed around or over a point / centroid #1750
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Right now, only the labels which are set to horizontal placement are displayed to the horizontal of the canvas. That behavior should be extended to labels with placement set to be around point/centroid of offset of point/centroid. This pull request does it in the simplest of ways.
Right now, this is how things look for labels placed around point / centroid when rotation value is 45 degrees:
With my pull request applied, the labels placed around point / centroid with rotation value of 45 are rendered as such:
Is far from perfect, as long labels can look detached from respective points (see the Chamka Chrey Khang Tbong label and its triangle point below it, quite far when compared to other labels for the triangle symbology). But to fix that, it'll probably require a much deeper refactoring.
This patch is a quick band-aid until a deeper code change occurs.
@dakcarto , @strk , could we apply this for the immediate benefits prior to a bigger re-thinking of how rotated labels should work?