How to use the bpmn-js/lib/Viewer.prototype function in bpmn-js

To help you get started, we’ve selected a few bpmn-js examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github bptlab / chor-js / lib / Viewer.js View on Github external
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;
};
github bpmn-io / bpmn-js-examples / custom-bower-bundle / index.js View on Github external
// 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;
github bpmn-io / bpmn-js-examples / custom-bundle / src / custom-viewer.js View on Github external
* @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
);