Skip to content

Commit

Permalink
clarify limitations of collision detection while moving multiple shapes
Browse files Browse the repository at this point in the history
  • Loading branch information
hofstef committed Jan 27, 2025
1 parent 5c34144 commit 46cd5fc
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/app/tools/modeler/diagram-js/features/domainStoryRules.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,17 @@ DomainStoryRules.prototype.init = function () {
let target = context.target,
shapes = context.shapes;

// The idea of this code is to make sure that if any of the selected shapes cannot be moved,
// then the whole selection cannot be moved. However, it actually only checks
// if the shape that is under the mouse cursor is over another shape.
// This is probably enough as a full detection over overlapping shapes might make it hard
// to move large selections
return reduce(
shapes,
function (result, s) {
if (result === false) {
return false;
}
return canCreate(s, target);
},
undefined,
Expand Down

0 comments on commit 46cd5fc

Please sign in to comment.