Skip to content

Conversation

sncer
Copy link

@sncer sncer commented Dec 25, 2024

When the scale value is not 1, the top and bottom of the bounds are incorrectly divided by the scale

@@ -341,15 +341,15 @@ export class Rnd extends React.PureComponent<Props, State> {
const parentLeft = parentRect.left;
const parentTop = parentRect.top;
const left = (boundaryLeft - parentLeft) / scale;
const top = boundaryTop - parentTop;
const top = boundaryTop - parentTop / scale;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it needed to add paren?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes,it should be const top = (boundaryTop - parentTop) / scale;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants