From 46cd5fcc796a6eae7b5a54497daa3fcf484b3c2d Mon Sep 17 00:00:00 2001 From: hofstef Date: Mon, 27 Jan 2025 13:09:26 +0100 Subject: [PATCH] clarify limitations of collision detection while moving multiple shapes --- .../tools/modeler/diagram-js/features/domainStoryRules.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/app/tools/modeler/diagram-js/features/domainStoryRules.js b/src/app/tools/modeler/diagram-js/features/domainStoryRules.js index 98470fed..f223b14e 100644 --- a/src/app/tools/modeler/diagram-js/features/domainStoryRules.js +++ b/src/app/tools/modeler/diagram-js/features/domainStoryRules.js @@ -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,