Skip to content

Fix for calculation of widget position#246

Open
ojhp wants to merge 1 commit into
lpongetti:masterfrom
ojhp:bugfix/node-bounds-calculation
Open

Fix for calculation of widget position#246
ojhp wants to merge 1 commit into
lpongetti:masterfrom
ojhp:bugfix/node-bounds-calculation

Conversation

@ojhp
Copy link
Copy Markdown

@ojhp ojhp commented May 9, 2026

After a lot of playing around, I believe the offset for a marker/cluster's top-left position should be in the range of -1 to 0 multiplied by the width/height instead of -0.5 to 0.5. (e.g. if the marker is to the top left of the point, the top left of the marker is the whole of the marker's width/height away (-1 offset), if the marker is to the bottom right, the top left of the marker is on the point (0 offset).

I believe this fixes #243 where widgets disappear half way through being scrolled off the bottom or right hand sides of the viewport.

Thanks for the library!

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.

Widgets are removed too early from viewport

1 participant