feat(import): expose additional BpmnTreeWalker functionality

* expose API needed for lazy sub-process imports
* also changes #handleDeferred to NOT expect deferred
  as a parameter anymore

Related to bpmn-io/bpmn-js-signavio-compat#1
This commit is contained in:
Philipp Fromme
2018-04-23 08:52:35 +02:00
committed by Nico Rehwaldt
parent a74ed871a4
commit 12a38da9c7
2 changed files with 182 additions and 2 deletions

View File

@ -10,6 +10,7 @@ import {
elementToString
} from './Util';
// TODO: should be configurable: true as well which would allow to remove binding
var diRefs = new Refs({ name: 'bpmnElement', enumerable: true }, { name: 'di' });
/**
@ -230,7 +231,7 @@ export default function BpmnTreeWalker(handler, translate) {
handleDeferred(deferred);
}
function handleDeferred(deferred) {
function handleDeferred() {
var fn;
@ -453,6 +454,9 @@ export default function BpmnTreeWalker(handler, translate) {
// API //////////////////////
return {
handleDefinitions: handleDefinitions
handleDeferred: handleDeferred,
handleDefinitions: handleDefinitions,
handleSubProcess: handleSubProcess,
registerDi: registerDi
};
}