Closed thestonefox closed 11 years ago
Nevermind, using a combination of removeAll and hideSelectionWidget will give me the desired outcome.
Hi!
< Nevermind, using a combination of removeAll and hideSelectionWidget will give me the desired outcome. >
Yes, that will work. You could also use hideAnnotations
and hideSelectionWidget
. This way you could later re-enable again, without loosing the anntotations. But I think it will make sense to have a separate opposite to makeAnnotatable, as you say. Not sure how to name the API method yet. But I'll keep this issue open for now!
Thx, Rainer
Just noticed an issue with showSelectionWidget (or it's something I'm doing wrong)
I'm basically doing this:
anno.hideSelectionWidget(myImage.src); anno.showSelectionWidget(myImage.src);
and i'm getting the following console error:
Uncaught ReferenceError: item_url is not defined ---> annotorious-0.5.min.js:122
any ideas?
Yes - sorry. Indeed that's a bug which I fixed after the 0.5 release! Can you replace your release of annotorious.min.js with the most up-to-date dev version? Just hotlink to (or download from) http://annotorious.github.io/latest/annotorious.min.js
Hi,
using the latest code, i no longer get the error but calling showSelectionWidget doesn't seem to bring back the annotation thingy.
but, calling anno.makeAnnotatable(myItem); again makes it come back ok
< calling showSelectionWidget doesn't seem to bring back the annotation thingy. >
Ouch. Bug. I updated annotorious.min.js with a fix for this!
Yes, makeAnnotatable
will bring everything back. But the old annotation canvas doesn't get properly destroyed underneath the hood. So this could cause problems further down the line. I need to look into this case more closely. But in any case: another reason for having a destroy(opt_item_url)
method (and/or a check that keeps things clean if makeAnnotatable is called multiple times).
Yeah the latest version has fixed the showSelectionWidget issue :)
thanks mucho!
Now implemented through anno.destroy(opt_item_url)
and anno.reset
API methods. Details are on the
Wiki
I want to be able to dynamically say stop this object from being annotatable, so the opposite of makeAnnotatable
Is there a way? I don't see it in the documentation.