JS crop tool based on canvas