-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed copy/paste for rotated shapes #4061
Conversation
Could you please add a test with copy/paste a rotated shape? |
Sure. I`ll update the corresponding test. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Marishka17 That is not |
…oordinates matching because they are in different coordinate spaces
function testActivatingShape(x, y, expectedShape) { | ||
cy.get('.cvat-canvas-container').trigger('mousemove', x, y); | ||
cy.get(expectedShape).should('have.class', 'cvat_canvas_shape_activated'); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you remove this check?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because it is not necessary anymore. Previous test implementation activated shapes to get coordinates of circles.
These coordinates needed to check final result. The test worked this way, but it was a kind of lucky. Circles for different shapes are located in different coordinate spaces and comparing them is incorrect way. Two points in different places on canvas can have the same coordinates (0,0 for example). I've rewritten the test and now it gets correct position from shape attributes.
Motivation and context
How has this been tested?
Resolve #4038
Checklist
develop
branchcvat-core, cvat-data and cvat-ui)
License
Feel free to contact the maintainers if that's a concern.