Minor picky comment, both this and the above if statement set `zoomFactor`.  It seems like these statements could be written more clearly as an if/else and maybe even simplified further.