How to get the selected rect from multiple rects?

Hi

I wonder if there’s a way to find which rect has been selected or in edit stat.

屏幕快照 2022-06-30 下午4.25.22

as above, the relayoutData are all the same no matter which rect is under edit. So how could get the chosen one?

PS. I found “shapelayer” in html is changing while altering different rect, but still don’t know how to get it.

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.