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 update of line dashes #672

Merged
merged 1 commit into from
Aug 19, 2024
Merged

Conversation

protogenes
Copy link
Contributor

Changing Number[] lineDashArrayProperty will not update the binding double[] lineDashesProperty which is used by the renderer (via StyleUtils), thus any change will never be shown on screen.

This is just a quick fix, in my opinion it would be better to remove lineDashesProperty and use some variant of toLineDashArray to convert the Number[] when rendering

Copy link

sonarcloud bot commented Aug 15, 2024

Copy link
Member

@wirew0rm wirew0rm left a comment

Choose a reason for hiding this comment

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

Thanks for catching this, thanks for the explanation and the fix 🙏 👍

I'll have to look into why we have both the Number[] and double[] properties there and whether it is still needed or can be handled during the rendering as you propose. For now I would assume that since these should be small arrays that rarely change the overhead for the binding shouldn't cause too much trouble but of course it makes following the code less straightforward, so if it's possible to simplify that we should probably do that.

@wirew0rm wirew0rm merged commit 9cff45b into fair-acc:main Aug 19, 2024
5 of 6 checks passed
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