-1

I have a small div (overflow:hidden) in which I'm showing a big image which is draggable. I want to crop the Image in the exact position in which it is visible in the div.

NOTE: I know I can use html2canvas, but I want to crop the Image in its original size.

Cœur
  • 37,241
  • 25
  • 195
  • 267
Ankush
  • 1
  • 1

1 Answers1

1

See this link to get the position of a DOM element: Get the position of a div/span tag

It sounds like you'll need to get the position of several different elements to calculate the relative coordinates you want.

Community
  • 1
  • 1
V. Rubinetti
  • 1,324
  • 13
  • 21