From 5c5656aceb8daab740fe08c45689908f51f900b8 Mon Sep 17 00:00:00 2001 From: Philipp Fromme Date: Mon, 4 Nov 2019 15:28:06 +0100 Subject: [PATCH] feat(bpmn-layouter): be able to specify waypoints When reconnecting a connection reversely we need to be able to specify the waypoints which will also be reversed. --- lib/features/modeling/BpmnLayouter.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/features/modeling/BpmnLayouter.js b/lib/features/modeling/BpmnLayouter.js index 5857f438..0ccef9ea 100644 --- a/lib/features/modeling/BpmnLayouter.js +++ b/lib/features/modeling/BpmnLayouter.js @@ -31,11 +31,13 @@ inherits(BpmnLayouter, BaseLayouter); BpmnLayouter.prototype.layoutConnection = function(connection, hints) { - hints = hints || {}; + if (!hints) { + hints = {}; + } var source = hints.source || connection.source, target = hints.target || connection.target, - waypoints = connection.waypoints, + waypoints = hints.waypoints || connection.waypoints, start = hints.connectionStart, end = hints.connectionEnd;