javascript coding resizing stage / canvas