Skip to content

Make OpenSeadragon polygon simplification tolerance configurable - #610

Merged
rsimon merged 1 commit into
annotorious:mainfrom
VrtxOmega:fix-polygon-simplification-tolerance-595
Jun 12, 2026
Merged

Make OpenSeadragon polygon simplification tolerance configurable#610
rsimon merged 1 commit into
annotorious:mainfrom
VrtxOmega:fix-polygon-simplification-tolerance-595

Conversation

@VrtxOmega

Copy link
Copy Markdown
Contributor

Closes #595.

Summary

  • add a polygonSimplificationTolerance OpenSeadragon option for the Pixi display layer
  • keep the existing default tolerance of 1 so current rendering behavior stays unchanged by default
  • allow callers to set the tolerance to 0 when they need full polygon/multipolygon geometry preserved
  • add regression coverage for polygon and multipolygon simplification tolerance

Validation

  • npm test --workspace @annotorious/annotorious -- simplificationTolerance.test.ts
  • npm test --workspace @annotorious/annotorious
  • npm run build --workspace @annotorious/openseadragon
  • npm test
  • npm run build

@rsimon

rsimon commented Jun 12, 2026

Copy link
Copy Markdown
Member

Looks good - many thanks!

@rsimon
rsimon merged commit 25f7a16 into annotorious:main Jun 12, 2026
@VrtxOmega

Copy link
Copy Markdown
Contributor Author

Thanks for the quick review and merge. Glad this helps OpenSeadragon users preserve full polygon geometry when needed while keeping the default behavior unchanged.

Small note: this went through my local PCF contribution gate before submission, which helped keep the change narrow and regression-tested.

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.

Bug: Gratuitous polygon simplification

2 participants