Add onPanelExpanding/onPanelCollapsing callbacks