Made drawing stop if leave canvas