Closed JamesLMilner closed 7 years ago
Are you able to describe a reliable way to see this happening, using the Leaflet example, for instance?
Hey @tomchadwin thanks for request for clarification. It's been a while since I've replicated this, but if I remember correctly:
1) Remove this._hideShownCollisions() from the library source code: https://github.com/Geovation/labelgun/blob/master/src/labelgun.js#L213 2) Rebuild with Webpack 3) Use the rebuilt Labelgun library iwith the Leaflet example 4) Zoom in and out in a random fashion and you will eventually see the bug appear; labels will overlap
I'll see if I can write a failing test case for this at some point as it's a pretty irritating bug!
This has been fixed in the change of algorithm in 5.0.0
For one reason or another we have to call this._hideShownCollisions() in order to hide labels that shouldn't be shown (I'd say it effects about 5% of labels). Not sure what the root cause of this is, but obviously a hack and decreases performance so would be A+++ to get rid of.