Skip to content
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

Add multi segment drag and drop #7536

Merged
merged 8 commits into from
Jan 15, 2024
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ For upgrade instructions, please check the [migration guide](MIGRATIONS.released
- Added thumbnails to the dashboard dataset list. [#7479](https://github.com/scalableminds/webknossos/pull/7479)
- Adhoc mesh rendering is now available for ND datasets.[#7394](https://github.com/scalableminds/webknossos/pull/7394)
- When setting up WEBKNOSSOS from the git repository for development, the organization directory for storing datasets is now automatically created on startup. [#7517](https://github.com/scalableminds/webknossos/pull/7517)
- Multiple segments can be dragged and dropped in the segments tab. [#7536](https://github.com/scalableminds/webknossos/pull/7536)


### Changed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1836,9 +1836,11 @@ class SegmentsView extends React.Component<Props, State> {
: dropTargetGroupId;
}
if (dragNode.type === "segment") {
// A segment is being dropped onto/next to a segment or group.
// Segment(s) were dragged onto/next to a segment or group.
// It is possible to drag a segment that was not selected. In that case, the selected segments are moved aswell.
dieknolle3333 marked this conversation as resolved.
Show resolved Hide resolved
const selectedSegmentIds = this.state.selectedIds.segments;
this.props.updateSegments(
[dragNode.id],
[dragNode.id, ...selectedSegmentIds],
{ groupId: targetGroupId },
this.props.visibleSegmentationLayer.name,
true,
Expand Down