add resize handler for Canvas and redraw hook