Skip to content
Snippets Groups Projects

Fix annotation on rotated elements

Merged Erwan Rouchet requested to merge fix-interactiveimage-rotated-annotation into master
All threads resolved!

Closes #938 (closed)

This adds a new option to the boundingBox helper to disable the sanity checks related to the image. They are enabled by default, which prevents breaking IIIF URLs among other things, but can be turned off to compute bounding boxes that leave the image, which commonly occurs for any non-square image that gets rotated.

This option is then used in ElementImage, since it used a custom bounding box calculation to avoid the image's bounds, and is used in the InteractiveImage to map the svgInput SVG element that is used as a helper to map coordinates in the SVG to coordinates on the original element. This allows the coordinates to be translated properly when clicking or moving the mouse. The elementLimits method has also been updated to use the original, non-rotated bounding box, for bounds checking, which removes the "invisible walls".

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Erwan Rouchet resolved all threads

    resolved all threads

  • Erwan Rouchet added 1 commit

    added 1 commit

    • e89755b6 - Apply 1 suggestion(s) to 1 file(s)

    Compare with previous version

  • Bastien Abadie mentioned in commit 35f00355

    mentioned in commit 35f00355

  • mentioned in issue #969 (closed)

  • Please register or sign in to reply
    Loading