auto resize canvas height