Zoom where move cursor is in orthographic mode

The error is on totalX:

image

It seems camera.panningSensibility = 6250 / Math.abs(totalX / 2); should be inside if (zoomTarget) {.