You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello! I have some complex polygons. When I am editing them, the detailed shape is preserved, but when I deselect- all details are lost. Is there a way to disable this? If not, can you point me to the code where this is happening, so I could make the changes and maybe PR it?
yes, that's correct. There's on-the-fly polygon simplification in the rendering layer. A bit of a self-protection mechanism that helps preserve performance when polygons get very complex and/or there are many annotations. But I can see how that's not the priority sometimes.
The the code you're pointing to calls the simplifyPolygon and simplifyMultipolygon functions. Both have a second optional argument (not used in PixiLayer) called tolerance.
One possible approach would be to make this configurable as an init argument to Annotorious. You can see the effect that tolerance has on polygon smoothing here:
Activity
rsimon commentedon Jan 21, 2026
Hi @microfauna,
yes, that's correct. There's on-the-fly polygon simplification in the rendering layer. A bit of a self-protection mechanism that helps preserve performance when polygons get very complex and/or there are many annotations. But I can see how that's not the priority sometimes.
The the code you're pointing to calls the simplifyPolygon and simplifyMultipolygon functions. Both have a second optional argument (not used in PixiLayer) called
tolerance.One possible approach would be to make this configurable as an init argument to Annotorious. You can see the effect that
tolerancehas on polygon smoothing here:https://mourner.github.io/simplify-js/