Add multi-object canvas selection - #11084
Conversation
# Conflicts: # cvat-ui/src/components/annotation-page/canvas/views/canvas2d/canvas-wrapper.tsx # cvat-ui/src/containers/annotation-page/standard-workspace/objects-side-bar/objects-list.tsx
|
Proposed testing scenarios: Creating and refining a selection
Selection mode
Clearing and replacing selection
Selection presentation
Moving selected objects
Deleting a selection
Copying and pasting
Batch properties
Batch label changes
Selection history
Objects sidebar
|
There was a problem hiding this comment.
Ctrl+clickon a shape- Click on
...- nothing happens
The selection menu is only opened on the second click on.... Also, it's never closed on subsequent clicks.
Note: if I make selection withShift+dragit opens the selection menu on the first click on...
| title={labelSelectorDisabled ? labelSelectorDisabledReason : undefined} | ||
| > | ||
| {applicableLabels.length ? ( | ||
| <LabelSelector |
| }} | ||
| /> | ||
|
|
||
| {selectionMenuPosition && ( |
There was a problem hiding this comment.
All selection actions but Copy drop the selection. I'm not sure it's convenient. E.g. what if you want to change both "Pinned" and "Label" for the same selection?
| }} | ||
| /> | ||
|
|
||
| {selectionMenuPosition && ( |
There was a problem hiding this comment.
Copy copies the selection but the only way to actually Paste is is via the Ctrl+v shortcut. It's a bit confusing and not consistent with how Make a copy works for one shape.
| }} | ||
| /> | ||
|
|
||
| {selectionMenuPosition && ( |
There was a problem hiding this comment.
When all selected items share the same label and some are locked the tooltip about why changing label is disable is only displayed when hovering outside of the selected value.
Hover over the selected value:

Hover over the frame:

It is displayed when labels are different though:
Hover over the selected value:

There was a problem hiding this comment.
- Click
Select objectsmode - Click any shape so 1-shape multi-selection is displayed
- Right click on the selection bbox
Selection is dropped instead of showing the selection menu
There was a problem hiding this comment.
When multi-selecting tracks the selection is dropped when going to the next frame.
Regular active track remains active when moving to the next frame.
There was a problem hiding this comment.
Not sure why it should be a modal for multi-selection?
Overall, why can't we make the selection controls look the same as the control displayed when a single shape is right clicked instead of the context menu?
It will be consistent and familiar to the user.
There was a problem hiding this comment.
- Select multiple shapes with the same label
- Edit attributes, click apply
- Click Undo -> first it brings back the selection
- Click Undo again -> it reverts the attributes change
- Redo is not available at this point for some reason
3+4- should be single undo operation
5- Redo should be availble
| SWITCH_SELECTION_LOCK: { | ||
| name: 'Lock/unlock selected objects', | ||
| description: 'Change locked state for all selected objects', | ||
| sequences: ['s l'], |
There was a problem hiding this comment.
Do we need separate sequences for multi-selection actions? Can we reuse the active component sequences? Like simply l here, p for pinned etc.
There was a problem hiding this comment.
Good idea actually, I thought to make it separate like t l and t p for all objects, but I guess using l and p is better way
|
Also, how do we handle points for selection? I proposed allowing adding points to selection to move them all at once. What do you think about this behavior? I can also make so we can add individual points to the selection, but it's kinda complicated. |
|
I think we definitely don't want to add individual points to selection, at least not with the way they are organized now. |
|
Hello
UPD: probably latest related with that one of masks in the group slightly crossed the image border.
Production: mask/bounding box cut when partially moved outside of frame. So, these are found for 5 minutes of using the feature. |
|
Can you explain more? I don't think I get it. You mean that for Lock selection option is context menu we need to add unlocked icon? |
2026-09-02.11.46.42.AM.movOne object get selected when switching lock/unlock. |
|
That makes sense, but in the sidebar icon is both button and the indicator of lock/unlock state of an object while inside selection context menu it's just a button that makes certain action. I'm not sure if it's a mismatch. |
It is not just a button that makes certain actions. This icon is switched after clicking the button. So, it is a button + indicator of current state. |
Is it expected behavior? I fixed it manually because it seemed like a bug to me |
It is expected and very important. Without this, how could you drag a shape to an object on frame edge? |
Yeah, I missed this. I will revert this |






Motivation and context
This PR introduces multi-object selection and batch operations in the 2D annotation workspace.
It addresses one of the most requested CVAT features:
Closes #2340
Users can now:
Ctrl + click.Shift + click.Ctrl + A.The selection is represented by a visible bounding box and a
SELECTION (N)label. Its context menu exposes batch actions and disables operations that cannot be applied to every selected object.Batch updates, deletion, creation, and movement are recorded as single history actions where applicable. Ground-truth and unsupported objects are validated before a batch operation begins.
The implementation also adds immutable selection clipboard snapshots, transformed bounding-box checks for rotated objects, and shared helpers for selection state and batch lock/pin behavior.
How has this been tested?
The following checks were run locally:
cvat-core,cvat-canvas, andcvat-ui.git diff --check.The following workflows were also tested manually in the 2D annotation workspace:
Ctrl + clickselection.Shift + clickrange selection in the Objects sidebar.Ctrl + A.Checklist
developbranchLicense
Feel free to contact the maintainers if that's a concern.