resolved visualLIne bug,added corresponding tests