mirror of
https://github.com/sartography/bpmn-js.git
synced 2025-01-13 18:46:05 +00:00
ece7b7d597
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
15 lines
334 B
JavaScript
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;
|
|
}
|
|
}; |