Skip to content

Commit

Permalink
Add multi segment drag and drop (#7536)
Browse files Browse the repository at this point in the history
* drag selected segments as well as the dragged segment

* add comment

* add changelog
  • Loading branch information
dieknolle3333 committed Jan 15, 2024
1 parent d8a1acb commit b60dc9d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
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 as well.
const selectedSegmentIds = this.state.selectedIds.segments;
this.props.updateSegments(
[dragNode.id],
[dragNode.id, ...selectedSegmentIds],
{ groupId: targetGroupId },
this.props.visibleSegmentationLayer.name,
true,
Expand Down

0 comments on commit b60dc9d

Please sign in to comment.