annotorious / annotorious-v1

Project has moved to http://github.com/annotorious/annotorious
https://annotorious.com
MIT License
593 stars 142 forks source link

Remove handler for an event #193

Open gtopsis opened 6 years ago

gtopsis commented 6 years ago

I know that this tool is not maintained anymore but maybe someone is interested to help, so...

the method addHandler adds the same function as a handler for an event every time the page is loaded so I would like to know if there is a way to remove a handler.

Any tip would help.

SHUwangwei commented 6 years ago

Can I ask you a question about the starting of annotorious? I read the guide of annotorious at http://annotorious.github.io/getting-started.html. so I add the code at my page head:

But I don't know why it doesn't work? Can you help me? Thanks!

SHUwangwei commented 6 years ago

I followed exactly the instructions on the website: http://annotorious.github.io/getting-started.html. This is the head of my code:

But it didn't work. I am so confused.

jimdeng92 commented 6 years ago

I have the same problem now. Has your problem been solved? Please reply to me

stan-sack commented 4 years ago

@aaaxiu the way i've been dealing with this is passing a generic handler to annotorious:

window.anno.addHandler("onAnnotationCreated", annotation =>
                    this.onAnnotationCreated(annotation)
                )

then I update the value of this.onAnnotationCreated when i want to change the callback. Not ideal but its kinda works

adeelhussain commented 4 years ago

The issue is removeHandler is added but is not exposed! I just have created a new PR #215 which is exposing that method.