functionality to change the size of an object by clicking on it