Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
Viewer.prototype._createModdle = function(options) {
let moddle = BaseViewer.prototype._createModdle.call(this, options);
// attach ids to moddle to be able to track
// and validated ids in the BPMN 2.0 XML document
// tree
moddle.ids = new Ids([ 32, 36, 1 ]);
return moddle;
};
// get bpmn-js
var BpmnViewer = require('bpmn-js/lib/Viewer');
// load additional modules
var additionalModules = [
require('diagram-js/lib/navigation/movecanvas'),
require('diagram-js/lib/navigation/zoomscroll')
];
// add additional (default!) modules to bpmn-js
BpmnViewer.prototype._modules = BpmnViewer.prototype._modules.concat(additionalModules);
// export
module.exports = BpmnViewer;
* @param {Object} options
*/
export default function CustomViewer(options) {
Viewer.call(this, options);
}
inherits(CustomViewer, Viewer);
CustomViewer.prototype._customModules = [
ZoomScrollModule,
MoveCanvasModule,
CustomLoggingModule
];
CustomViewer.prototype._modules = [].concat(
Viewer.prototype._modules,
CustomViewer.prototype._customModules
);