feat(Modeler+Viewer): correctly use BpmnRenderer
This commit is contained in:
parent
3db137a0ce
commit
9d1dd58ac5
|
@ -3,8 +3,6 @@ var Diagram = require('diagram-js');
|
|||
var bpmnModule = require('./di').defaultModule,
|
||||
Viewer = require('./Viewer');
|
||||
|
||||
require('./core/BpmnRegistry');
|
||||
|
||||
require('./draw/BpmnRenderer');
|
||||
|
||||
require('diagram-js/lib/features/dnd/Visuals');
|
||||
|
@ -29,7 +27,7 @@ Modeler.prototype.createDiagram = function() {
|
|||
return new Diagram({
|
||||
canvas: { container: this.container },
|
||||
modules: [ bpmnModule ],
|
||||
components: [ 'selectionVisuals', 'dragVisuals', 'bpmnRegistry']
|
||||
components: [ 'selectionVisuals', 'dragVisuals' ]
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
@ -1,12 +1,18 @@
|
|||
var Diagram = require('diagram-js');
|
||||
|
||||
var Importer = require('./import/Importer'),
|
||||
var Diagram = require('diagram-js'),
|
||||
BpmnModel = require('bpmn-moddle'),
|
||||
failSafeAsync = require('./Util').failSafeAsync,
|
||||
fs = require('fs'),
|
||||
$ = require('jquery'),
|
||||
_ = require('lodash');
|
||||
|
||||
var Importer = require('./import/Importer'),
|
||||
failSafeAsync = require('./Util').failSafeAsync;
|
||||
|
||||
var bpmnModule = require('./di').defaultModule;
|
||||
|
||||
require('./draw/BpmnRenderer');
|
||||
require('diagram-js/lib/features/selection/Visuals');
|
||||
|
||||
|
||||
function getSvgNode(diagram) {
|
||||
var paper = diagram.get('canvas').getPaper();
|
||||
return paper.node;
|
||||
|
@ -50,7 +56,7 @@ function Viewer(options) {
|
|||
|
||||
var logoData = fs.readFileSync('resources/bpmnjs.png', 'base64');
|
||||
|
||||
var a = $('<a href="http://bpmn.io" target="_blank" draggable="false" />').css({
|
||||
var a = $('<a href="http://bpmn.io" target="_blank" title="Powered by bpmn.io" draggable="false" />').css({
|
||||
position: 'absolute',
|
||||
bottom: 15,
|
||||
right: 15,
|
||||
|
@ -153,7 +159,12 @@ Viewer.prototype.initDiagram = function(diagram) {
|
|||
};
|
||||
|
||||
Viewer.prototype.createDiagram = function() {
|
||||
return new Diagram({ canvas: { container: this.container }});
|
||||
|
||||
return new Diagram({
|
||||
canvas: { container: this.container },
|
||||
modules: [ bpmnModule ],
|
||||
components: [ 'selectionVisuals' ]
|
||||
});
|
||||
};
|
||||
|
||||
Viewer.prototype.clear = function() {
|
||||
|
|
|
@ -3,6 +3,9 @@ var bpmnModule = require('../di').defaultModule;
|
|||
require('diagram-js/lib/core/EventBus');
|
||||
require('diagram-js/lib/draw/Styles');
|
||||
|
||||
require('../core/BpmnRegistry');
|
||||
|
||||
|
||||
var DefaultRenderer = require('diagram-js/lib/draw/Renderer');
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue