Skip to content

Fix #856: Polyline border drawing#866

Merged
kengu merged 1 commit intofleaflet:masterfrom
Ahmed-gubara:master
Apr 6, 2021
Merged

Fix #856: Polyline border drawing#866
kengu merged 1 commit intofleaflet:masterfrom
Ahmed-gubara:master

Conversation

@Ahmed-gubara
Copy link
Copy Markdown
Contributor

Fix for Issue #856
This fix Polyline border drawing bug introduced in version 0.11.0 PR #766 .
Causing the bug was that borderPaint.style = PaintingStyle.stroke was set after the drawing line _paintLine(...,borderPaint), which made the drawing use the default PaintingStyle.fill causing the border to create a filled shape.

if (borderPaint != null) {
if (filterPaint != null) {
filterPaint.style = PaintingStyle.stroke;
_paintLine(canvas, polylineOpt.offsets, borderPaint);
}
borderPaint?.style = PaintingStyle.stroke;
_paintLine(canvas, polylineOpt.offsets, filterPaint);
}

Reordering the style set statement before the _paintLine(...) statement fixed the bug.

flutter_map

@Ahmed-gubara Ahmed-gubara marked this pull request as draft April 6, 2021 13:29
@Ahmed-gubara Ahmed-gubara marked this pull request as ready for review April 6, 2021 13:33
@Ahmed-gubara
Copy link
Copy Markdown
Contributor Author

Hey @kengu, can you please review the changes?

Copy link
Copy Markdown
Contributor

@kengu kengu left a comment

Choose a reason for hiding this comment

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

LGTM

@kengu
Copy link
Copy Markdown
Contributor

kengu commented Apr 6, 2021

@Ahmed-gubara Tested locally and it seems to work as expected. Thanks for the contribution!

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