Closed Sedoid closed 1 year ago
I've cloned and resolved the broken links issues could find, can i submit a PR on this
Ah, awesome - thanks for spotting. And, yes, a PR would be wonderful!
hello, ive been going through to documentation for hours how but im unfortunately not able resolve the issue i get.
Description: im using these packages below as recommended by the docs in an attempt to perform annotation on an openseadragon image
import OpenSeadragon from 'openseadragon';
import * as Annotorious from '@recogito/annotorious-openseadragon';
import '@recogito/annotorious-openseadragon/dist/annotorious.min.css';
Below is how i initialize OSD so it works Annotorious
const viewerObject = useCallback(
{
initializeViewer: useCallback(() =>{
if(viewerRef.current) {
const viewer = OpenSeadragon({
id: "home",
prefixUrl: './images/', // Adjust the path to OpenSeadragon assets
tileSources: 'http://127.0.0.1:8182/iiif/2/liver.svs/info.json',
showNavigator: true,
crossOriginPolicy: "Anonymous",
disableSelect: false
});
const config = {
};
const annotate = Annotorious(viewer, config); ............
And lastly , call the functions in a useEffect
useEffect(() => {
viewerObject.initializeViewer()
return () => {
viewerObject.destroyViewer()
};
}, [viewerObject]);
return (
<>
<div ref={viewerRef} id="home"> </div>
</>
);
This is what i get as the result
Currentlly, it just draws forever , as soon as i Hold SHIFT key and start selecting an area.. which is good and expected.but the issue is, , it never stops even on mouse release, it draws and ever stops drawing.,,.. in the end, when i press the ESC key, it stops drawings and show an error on any other attempt of mouse movement.
pls, how can i fix this?
Did i miss a step?
Looks ok. Any error messages on the browser console?
No, there is no console error during the drag but an error appears when i press ESC key
ERROR Cannot read properties of null (reading 'dragTo') TypeError: Cannot read properties of null (reading 'dragTo')
Are you doing anything to change the drawing tool programmatically? Are you using specific plugins? Would it be possible for you to set up an online showcase for this, so I can reproduce?
No, i didn't implement any plugin nor drawing tool,
About the online showcase, is it fine if i push the code to a repository on github and share the link.
its a simple react app with one component.
Here it is
Ok, I can see the problem. You're using an outdated OpenSeadragon version. Current versions of Annotorious only work with OpenSeadragon 3.x (and should work with OSD 4.0, although it's a bit untested...)
If you strictly need to use OSD 2.4, you'd have to go back to Annotorious v2.6.x.
BTW npm install
of your project failed for me, exactly because the build ran into the OSD 2.4/3.0 dependency conflict.
Thanks, let me try with npm i openseadragon@3.1.0
it works now, Thanks a lot
do you think the required osd version should be specified somewhere in the docs? i could add it.
Yes, thanks that would be great. Perhaps on the intro paragraph of https://annotorious.github.io/getting-started/osd-plugin/?
Yes, it could be written in the same format as this
how about this
then i will create an issue and send the pr to it
or perhaps i just use this same issue
You can just send a PR, doesn't need to reference an issue. Thanks!!
hello, pls i want to inquire if npm install @recogito/annotorious-openseadragon
can be used with typescript.
is there a @types/recogito__annotorious-openseadragon
module for it, or is this done manually?
Hi, sorry no, I'm afraid there are no TS types available. There's an issue about this somewhere. (I think it may be on the main annotorious repo, not annotorious-openseadragon.) Some folks have voiced interest, but it has never happened. FWIW I'm already working on v3 of Annotorious, and this will be fully TypeScript. But for v2.x I'm very sorry to say that any
and @ts-ignore
will have to be your friend :-(
Alright, Thank You. Will be looking forward to v3 and also contribute where i can .... for now i'll do the most with any
and @ts-ignore
I have noticed several broken links on the website that need to be addressed and fixed.
Here are some examples of broken links I have come across:
The readmore link
All these
Annotorious
Steps to Reproduce:
Access the website. Navigate to the Getting Started. Click on any link the "Read More" section beneath the page. Observe that it does not direct to the intended page.