bpmn-js/lib/features/snapping/BpmnSnappingUtil.js
Nico Rehwaldt ece7b7d597 feat(snapping): snap boundary events
This adds immediate feedback when creating and moving boundary events.

* During move, boundary events are snapped, if attachment is allowed
* Boundary events snap to their siblings and not to elements inside
the host

Closes #320
2015-08-06 10:58:50 +02:00

15 lines
334 B
JavaScript

'use strict';
var getOrientation = require('diagram-js/lib/layout/LayoutUtil').getOrientation;
module.exports.getBoundaryAttachment = function(position, targetBounds) {
var orientation = getOrientation(position, targetBounds, -15);
if (orientation !== 'intersect') {
return orientation;
} else {
return null;
}
};