BpmnAutoPlace.js 380 B

123456789101112131415161718
  1. import { getNewShapePosition } from './BpmnAutoPlaceUtil';
  2. /**
  3. * BPMN auto-place behavior.
  4. *
  5. * @param {EventBus} eventBus
  6. */
  7. export default function AutoPlace(eventBus) {
  8. eventBus.on('autoPlace', function(context) {
  9. var shape = context.shape,
  10. source = context.source;
  11. return getNewShapePosition(source, shape);
  12. });
  13. }
  14. AutoPlace.$inject = [ 'eventBus' ];