How to get the selected rect from multiple rects?

while. I think there may have no simple/direct way to do that now. Several posts that I found for this:

  1. Feature request 644 on dash github. It seems plotly.js could handle it, but I do not know how to…

  1. https://community.plotly.com/t/events-for-shapes/9601

while I’d thought about that yesterday, here I found it may work. Great thanks to him!

Actually, my app is for object detection. And I want to choose or modify certain (but multiple) rects to see the result interactively.

It’s still quite strange why dash couldn’t handle this.