react-image-annotate icon indicating copy to clipboard operation
react-image-annotate copied to clipboard

How to make the button onNextImage perform onExit() saving

Open Tetiana-T opened this issue 3 years ago • 2 comments

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

Tetiana-T avatar Mar 06 '21 19:03 Tetiana-T

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 avatar Apr 24 '21 17:04 gotham13

@gotham13 What's setSelImage function?

speshowBUAA avatar Jun 29 '21 08:06 speshowBUAA