alx/react-bounding-box

Image is not redrawn on update

testower opened this issue · 2 comments

In reference to: #6 (comment)

The image does not seem to be redrawn after first render, even when the props change. Boxes update correctly, but the image stays the same. Even when passing "forceRedraw" prop doesn't help. Maybe I'm using this component incorrectly?

const ImageWithBoundingBoxes = ({ imageUrl, labels }) =>
  <BoundingBox
    forceRedraw
    image={imageUrl}
    boxes={labels}
    options={{
      colors: {
        normal: 'red',
        selected: 'rgba(0,225,204,1)',
        unselected: 'rgba(100,100,100,1)'
      },
      style: {
        maxWidth: '100%',
        maxHeight: '90vh'
      }
    }}
  />
alx commented

Hi @testower

I was able to create a new storybook story in order to reproduce this issue:

https://github.com/alx/react-bounding-box/tree/fix-image-redraw-issue-15

I'll let you know when it's corrected.

alx commented

thanks @testower , this issue has been fixe in v0.5.12

https://www.npmjs.com/package/react-bounding-box/v/0.5.12