add checks for lack of event.clientX or event.clientY in onMouseDown_, and use requestAnimationFrame instead of setTimeout for animations