mirror of
https://github.com/sartography/bpmn-js.git
synced 2025-01-22 23:08:49 +00:00
15 lines
377 B
JavaScript
15 lines
377 B
JavaScript
|
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;
|