fix uncaught referenc error: pinchDistance is not defined