What event is triggered when the Pro Gallery expand mode is closed?

I need to execute some code when the Pro Gallery expand mode is closed and it returns to its normal state. Can this event be captured, and if so, how?

Thank you