Added support for callback functions on resize and restore actions