// modify the offset amounts according to ScrollView movement
if (movement == Movement.Custom)
{
constraint.x *= customMovement.x;
constraint.y *= customMovement.y;
}
else if (movement == Movement.Horizontal)
{
constraint.y = 0.0f;
}
else if (movement == Movement.Vertical)
{
constraint.x = 0.0f;
}