add panel-resize event and handle it in scratchpad

fixes #728