UniversalDataTool / react-image-annotate

Create image annotations. Classify, tag images with polygons, bounding boxes or points.
MIT License
406 stars 178 forks source link

When Click Next it keeps flipping back to previous Image #129

Open greallye opened 3 years ago

greallye commented 3 years ago

Chrome Version - 87.0.4280.141 React Version - 17.0.1 react-image-annotate version - 1.7.12

When I have more than one image in the image array and try to click next it flips back to the first image every time. This happens when I have not created an annotation or if I have created one. The same thing happens on the clone button.

When I first started the react app it also states that a component is missing which is styled-components. Once I install this the app will start but the bug occurs.

The below code implementation has the issue.

import ReactImageAnnotate from "react-image-annotate";

function App() { return ( <ReactImageAnnotate labelImages regionClsList={["Alpha", "Beta", "Charlie", "Delta"]} regionTagList={["tag1", "tag2", "tag3"]} images={[ { src: "https://placekitten.com/408/287", name: "Image 1", regions: [] }, { src: "https://placekitten.com/408/286", name: "Image 2", regions: [] } ]} /> ); }

export default App;

Maybe I am doing something wrong or maybe I am missing an argument that needs to be passed.

This issue does not happen on version 1.7.1.

Fischbrot commented 3 years ago

I have the same issue.

I should have checked before....

I will rollback to 1.7.1

NikunjPansuriya commented 3 years ago

Yes, I am also facing the same issue. rollback with version 1.7.10 and it's working for me.

josepdecid commented 3 years ago

I asked the same in another issue and there is a way to fix that by writing custom next and previous handlers, as explained in

163