feat(Modeler): rename createDiagram to createTemplate
This will allow us to have the same interface on dmn-js BREAKING CHANGE: * Modeler.createDiagram is renamed to Modeler.createTemplate
This commit is contained in:
parent
b17d63e883
commit
4e79d16c90
|
@ -7,7 +7,7 @@ var IdSupport = require('bpmn-moddle/lib/id-support'),
|
|||
|
||||
var Viewer = require('./Viewer');
|
||||
|
||||
var initialDiagram =
|
||||
var initialTemplate =
|
||||
'<?xml version="1.0" encoding="UTF-8"?>' +
|
||||
'<bpmn:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ' +
|
||||
'xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" ' +
|
||||
|
@ -106,8 +106,8 @@ function Modeler(options) {
|
|||
|
||||
inherits(Modeler, Viewer);
|
||||
|
||||
Modeler.prototype.createDiagram = function(done) {
|
||||
return this.importXML(initialDiagram, done);
|
||||
Modeler.prototype.createTemplate = function(done) {
|
||||
return this.importXML(initialTemplate, done);
|
||||
};
|
||||
|
||||
Modeler.prototype.createModdle = function() {
|
||||
|
|
|
@ -20,7 +20,7 @@ describe('scenario - simple modeling', function() {
|
|||
var modeler = new Modeler({ container: container });
|
||||
|
||||
// when
|
||||
modeler.createDiagram(function(err) {
|
||||
modeler.createTemplate(function(err) {
|
||||
|
||||
done(err);
|
||||
});
|
||||
|
|
|
@ -189,7 +189,7 @@ describe('Modeler', function() {
|
|||
|
||||
it('should create new diagram', function(done) {
|
||||
var modeler = new Modeler({ container: container });
|
||||
modeler.createDiagram(done);
|
||||
modeler.createTemplate(done);
|
||||
});
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue