question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Drawing new crop with spin prop 90deg has wrong coords

See original GitHub issue

@Tenpi any ideas what is going on here 🤔? If I initialize with a crop it works fine:

const [crop, setCrop] = useState({ unit: '%', width: 30, aspect: 16 / 9 });

However drawing a new crop has the wrong coords:

https://codesandbox.io/s/react-image-crop-demo-using-spin-and-rotate-c6dsd?file=/src/App.js:733-811

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
Tenpicommented, May 4, 2022

I am still using the said removed props, so I will just use and maintain my own fork of this project if you don’t want to support those features. Though I understand why you don’t want to maintain them as they added a fair amount of complexity, it’s not a problem though really.

0reactions
3vilguycommented, Mar 7, 2022

Hi, thanks for the update. No problem at all, thanks for all the hard work and all the best with v10 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

how to get crop coordinates after a rotation javascript
This is assuming the crop is snug with the top left corner before rotation. I'll work out the general math in a bit....
Read more >
To Modify the Coordinates of Spline Points - PTC Support
To Rotate Objects in 90-Degree Increments · To Edit Labels or Reference Designators · To Delete Diagram Objects ... Example: ISOGEN Error Log...
Read more >
Adjust rotation and canvas size in Photoshop - Adobe Support
Adjust crop, rotation, and canvas size ... To reveal image areas that extend beyond the new document boundaries, choose Edit > Undo.
Read more >
Coordinate Systems, Transformations and Units — SVG 2
All SVG content is drawn inside SVG viewports . Every SVG viewport defines a drawing region characterized by a size (width, height), and...
Read more >
Creating and Managing ArchestrA Graphics User's Guide
Embedding a new ArchestrA symbol in WindowMaker. A new. AutomationObject instance is derived to which the symbol in.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found