Closed jquinn57 closed 6 years ago
@NFiedler is this reproducible? That would be a major bug.
I could reproduce the problem and the proposed fix works. I am not sure whether there is a more elegant solution which only calculates the scale when the image actually changes. But for now... it works. Thank you very much for your contribution @jquinn57 !
It seems that the when images are resized to fit into the window, the scale factor for the annotations sometimes does not match the image scale factor, so the boxes appear in the wrong place and are the wrong size. I have noticed when the window is resized then the scale factor is recomputed and then the boxes go to the correct location.
A simple solution to this is to add a call to calculateImageScale() on line 288 of imagetagger/imagetagger/annotations/static/js/annotations.js so that the image scale is always computed right before drawing the boxes. I have seen this problem occur in Firefox and Chrome. I am working with large images which are scaled down to fit in the window.