A question about servo motor direction control
But I couldn't figure out how in this case the direction of the motor
  is controlled.


It's a three phase motor and as such, direction of travel of the rotor is determined by the phase sequence of the applied voltage. Consider this; to reverse a 3ph induction motor just swap two of the windings. Swap another two and you're back to the original spin direction.

Swapping the phase sequence in the H bridge/driver is really trivial: -



Picture source