Fixed #1849 Fix a bug for convertToLocationInView

Fix a bug for convertToLocationInView