function whateverObj.onResize() { redrawDrawing();}function redrawDrawing() { // your drawing stuff here}