change canvas size with slider