Replies: 2 comments 5 replies
|
Can you provide a minimal reproducible example via CodeSandbox, StackBlitz, etc.? |
5 replies
|
Turns out I was trying to access the annotator using the useRef hook. Switching to useAnnotator solved the problem. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Uh oh!
There was an error while loading. Please reload this page.
Using the OpenSeadragonAnnotator / OpenSeadragonViewer react components.
Trying to load annotations from a data source using setAnnotations.
Using getAnnotations, I can see that the annotations appear to have been loaded but they don't render.
From another thread I thought it might be a problem with structure of the JSON object (sample below) but I'm struggling to figure out what's missing.
[ { "id": "ab22bd16-3133-4aea-9dea-13fa02da9fc1", "bodies": [ { "id": "atol-notation-1744826158884", "annotation": "ab22bd16-3133-4aea-9dea-13fa02da9fc1", "purpose": "commenting", "value": "This is a second test" } ], "target": { "annotation": "ab22bd16-3133-4aea-9dea-13fa02da9fc1", "selector": { "type": "RECTANGLE", "geometry": { "bounds": { "minX": 367.113615, "minY": 119.092387, "maxX": 470.420435, "maxY": 207.01057509999998 } } } } }, { "id": "7c8eb974-7597-427d-8b4a-fc6731462ab0", "bodies": [ { "id": "atol-notation-1744826149614", "annotation": "7c8eb974-7597-427d-8b4a-fc6731462ab0", "purpose": "commenting", "value": "This is a test" } ], "target": { "annotation": "7c8eb974-7597-427d-8b4a-fc6731462ab0", "selector": { "type": "RECTANGLE", "geometry": { "bounds": { "minX": 134.040587, "minY": 120.506414, "maxX": 205.7302368, "maxY": 208.2378182 } } } } } ]All reactions