fix canvas position bug when x or y is negtive