react-image-annotate
react-image-annotate copied to clipboard
How to make the button onNextImage perform onExit() saving
I am pretty new in Web. I use your I want to change onNextImage behavior By clicking onNextImage perform onExit(). Is it possible? I will appreciate for any help. thanks in advance
Here I managed to cook up something.
<ReactImageAnnotate selectedImage={selImage} taskDescription="# Draw r" images={images_arr} regionClsList={["Number Plate", "Odometer", "Crack","Dent"]} enabledTools={["create-polygon","create-box"]} onNextImage={(annotatorState)=>{ let currentImageIndex = annotatorState.selectedImage; if (currentImageIndex != null && currentImageIndex != annotatorState.images.length - 1) { let nextImage = annotatorState.images[currentImageIndex+1]; setSelImage(nextImage.src) } }} />
@gotham13 What's setSelImage function?