bpmn-js/lib/Diagram.js

15 lines
377 B
JavaScript
Raw Normal View History

var DiagramJS = require('diagram-js');
var Importer = require('./Importer');
function Diagram(container) {
this.container = container;
}
Diagram.prototype.importDefinitions = function(definitions, done) {
this.diagram = new DiagramJS({ canvas: { container: this.container }});
Importer.importBpmnDiagram(this.diagram, definitions, done);
};
module.exports = Diagram;