Skip to content

Commit

Permalink
Landmark widget: fix use of target relation after recent update
Browse files Browse the repository at this point in the history
  • Loading branch information
tomka committed Dec 18, 2024
1 parent 6f85489 commit c851e06
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions django/applications/catmaid/static/js/widgets/landmark-widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -938,6 +938,7 @@
// Get all transitively linked target groups from back-end. Add a
// transformation for each.
var self = this;
fromGroupId = parseInt(fromGroupId, 10);
return CATMAID.Landmarks.getTransitivelyLinkedGroups(project.id, fromGroupId, relationId)
.then(function(groups) {
if (groups.length === 0) {
Expand All @@ -950,14 +951,20 @@
throw new CATMAID.Warning("Could not find source skeletons");
}
let lst = new CATMAID.LandmarkSkeletonTransformation(project.id,
skeletons, [[fromGroupId, toGroupId]], undefined, undefined,
modelClass, self.useReversePointMatches);
skeletons, [[{
id: fromGroupId,
name: (self.sourceLandmarkGroupIndex || self.landmarkGroupIndex).get(fromGroupId).name,
}, {
id: toGroupId,
name: self.landmarkGroupIndex.get(toGroupId).name,
}]], undefined, undefined, modelClass, self.useReversePointMatches);
self.displayTransformations.push(lst);
self.displayTransformationIndexSets.push({
self.displayTransformationParameterSets.push({
landmarkGroupIndex: self.landmarkGroupIndex,
landmarkIndex: self.landmarkIndex,
sourceLandmarkGroupIndex: self.sourceLandmarkGroupIndex,
sourceLandmarkIndex: self.sourceLandmarkIndex,
sourceAnnotation: '',
});
}
CATMAID.Landmarks.trigger(CATMAID.Landmarks.EVENT_DISPLAY_TRANSFORM_ADDED);
Expand Down

0 comments on commit c851e06

Please sign in to comment.