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

Fix for rendering of weathermap halves #249

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

p4k8
Copy link

@p4k8 p4k8 commented May 16, 2020

When using conf.line_cut values of 0 and 1 only one half of line should be drawn.
Unfortunately, disabling one of the two renderArrows messes up parts array id's and consequently label drawing.
This patch is intended to fix render behavior for these values while disabling labels functionality for affected weathermap lines.
Haven't found easy way to make labels work as well, as it would seemingly require big changes to how render code for weathermap lines works.

When using `conf.line_cut` values of 0 and 1 only one half of line should be drawn.
Unfortunately, disabling one of the two `renderArrow`s messes up `parts` array id's and consequently label drawing.
This patch is intended to fix render behavior for these values while disabling labels functionality for affected weathermap lines.
Haven't found easy way to make labels work as well, as it would seemingly require big changes to how render code for weathermap lines works.
@LarsMichelsen
Copy link
Contributor

Seems that cases 1/0 were not really treated meaningfully. However, the label treatment is not good.

Couldn't we evaluate in line_cut in renderLables again and then paint only the label of the part that is visible?

@p4k8
Copy link
Author

p4k8 commented May 30, 2020

I tried that, but it breaks labeled line with value 1 completely because parts[id] values corresponding to it are null.

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