fix(modeling): add caveat for message flows layouting
related to bpmn-io/diagram-js#110
This commit is contained in:
parent
834f1844ec
commit
34bd632544
|
@ -44,6 +44,12 @@ BpmnLayouter.prototype.layoutConnection = function(connection, layoutHints) {
|
||||||
manhattanOptions = {
|
manhattanOptions = {
|
||||||
preferredLayouts: [ 'straight', 'v:v' ]
|
preferredLayouts: [ 'straight', 'v:v' ]
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (is(target, 'bpmn:Event')) {
|
||||||
|
manhattanOptions = {
|
||||||
|
preferredLayouts: [ 'v:v' ]
|
||||||
|
};
|
||||||
|
}
|
||||||
} else
|
} else
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -33,6 +33,7 @@ describe('features/modeling - layout connection', function() {
|
||||||
|
|
||||||
// expect cropped, repaired connection
|
// expect cropped, repaired connection
|
||||||
// that was not actually modified
|
// that was not actually modified
|
||||||
|
|
||||||
var waypoints = [
|
var waypoints = [
|
||||||
{ original: { x: 578, y: 341 }, x: 578, y: 341 },
|
{ original: { x: 578, y: 341 }, x: 578, y: 341 },
|
||||||
{ x: 934, y: 341 },
|
{ x: 934, y: 341 },
|
||||||
|
|
|
@ -71,9 +71,8 @@ describe('features/modeling - layout message flows', function() {
|
||||||
// expect cropped, repaired manhattan connection
|
// expect cropped, repaired manhattan connection
|
||||||
expect(messageFlowConnection.waypoints).eql([
|
expect(messageFlowConnection.waypoints).eql([
|
||||||
{ original: { x: 671, y: 214 }, x: 671, y: 214 },
|
{ original: { x: 671, y: 214 }, x: 671, y: 214 },
|
||||||
{ original: { x: 771, y: 465 }, x: 771, y: 465 }
|
{ original: { x: 671, y: 465 }, x: 671, y: 465 }
|
||||||
]);
|
]);
|
||||||
|
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue