Add support for resizing the canvas (still buggy)