Foliotek / Croppie

A Javascript Image Cropper
http://foliotek.github.io/Croppie
MIT License
2.58k stars 883 forks source link

Rotation results in inconsitent points #767

Open phillmagic opened 3 years ago

phillmagic commented 3 years ago

Expected Behavior

Expecting the height and width of the viewport to remain the same regardless of rotation added to the viewport boundary

Actual Behavior

The height is not accurate based on analysed calculation

Steps to Reproduce the Problem

  1. Add rotation to the viewport style (transform: rotate(30deg)
  2. Try and get points
  3. Calculate height with rotation, calculate height without rotation, different result

Example Link

Please recreate your issue using JSbin, JSFiddle, or Codepen.

Specifications