cursor direction is set as target grating direction