Open dhruvp opened 7 years ago
One more thing - I think it's related to the fact that self._currentAnnotation
is undefined
in the pass through this code block:
goog.array.forEach(this._annotations, function(annotation) {
if (annotation != self._currentAnnotation)
self._draw(self._shapes[annotorious.shape.hashCode(annotation.shapes[0])]);
});
As such, we try to draw the annotation that's being edited which I think is causing the issue? Still trying to figure out how self._currentAnnotation is set.
Ok I found the issue. It happens when you have two keypoints in the exact same position. This is because we delete from an array (this._annotations) leaving one item still in that array, but the dictionary self._shapes
no longer has it. Not sure if it's worth addressing or not but seems like an edge case potentially worth addressing.
Hi!
First of all thank you so much for creating and maintaining annotorious for the broader public. It has been a joy to use and has made our lives so much better!
One issue we've been seeing every so often is when we hit edit on an annotation, we get a javascript error in annotorious:
I've done my best at understanding why that happens and it seems to me that it corresponds to the code here:
https://github.com/annotorious/annotorious/blob/b3a1db3bf21abccd8b44b3e0c6c2b6479b11b1a9/src/mediatypes/image/image.viewer.js#L245-L248
What's happening is shape is a null object as passed in. This happens because the given shape is for some reason not in
self._shapes
as in this code snippet:This seems to happen somewhat randomly - most annotations in the same image work but the odd annotation will cause this error.
Would you please be able to help us debug this?
Thank you!
Dhruv