setting origin X and Y on canvas click working