annotorious / project-website-source

Source code for the project website
http://recogito.github.io/annotorious
2 stars 11 forks source link

Broken Links on Website #33

Closed Sedoid closed 1 year ago

Sedoid commented 1 year ago

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 getting_started

All these broken_links

Annotorious guides

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.

Sedoid commented 1 year ago

I've cloned and resolved the broken links issues could find, can i submit a PR on this

rsimon commented 1 year ago

Ah, awesome - thanks for spotting. And, yes, a PR would be wonderful!

Sedoid commented 1 year ago

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

Video of project behaviour

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.

Sedoid commented 1 year ago

pls, how can i fix this?

Did i miss a step?

rsimon commented 1 year ago

Looks ok. Any error messages on the browser console?

Sedoid commented 1 year ago

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')

rsimon commented 1 year ago

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?

Sedoid commented 1 year ago

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.

Sedoid commented 1 year ago

OSD_annotorious_demo

Here it is

rsimon commented 1 year ago

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.

rsimon commented 1 year ago

BTW npm install of your project failed for me, exactly because the build ran into the OSD 2.4/3.0 dependency conflict.

Sedoid commented 1 year ago

Thanks, let me try with npm i openseadragon@3.1.0

Sedoid commented 1 year ago

it works now, Thanks a lot

Sedoid commented 1 year ago

do you think the required osd version should be specified somewhere in the docs? i could add it.

rsimon commented 1 year ago

Yes, thanks that would be great. Perhaps on the intro paragraph of https://annotorious.github.io/getting-started/osd-plugin/?

Sedoid commented 1 year ago

Yes, it could be written in the same format as this

Screenshot from 2023-05-24 10-39-46

Sedoid commented 1 year ago

how about this

Screenshot from 2023-05-24 10-55-40

Sedoid commented 1 year ago

then i will create an issue and send the pr to it

Sedoid commented 1 year ago

or perhaps i just use this same issue

rsimon commented 1 year ago

You can just send a PR, doesn't need to reference an issue. Thanks!!

Sedoid commented 1 year ago

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?

rsimon commented 1 year ago

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 :-(

Sedoid commented 1 year ago

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