bound drag and zoom to the size of the image and smoothed out zoom