camunda-bpmn-js
Version:
Embeddable Camunda modeling distributions based on bpmn-js
47 lines (36 loc) • 1.11 kB
JavaScript
/**
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
* under one or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information regarding copyright
* ownership.
*
* Camunda licenses this file to you under the MIT; you may not use this file
* except in compliance with the MIT License.
*/
import inherits from 'inherits-browser';
import BaseViewer from '../base/Viewer';
import { commonModdleExtensions, commonModules } from './util/commonModules';
/**
* @typedef {import('bpmn-js/lib/BaseViewer').BaseViewerOptions} BaseViewerOptions
*/
/**
* @param {BaseViewerOptions} options
*/
export default function Viewer(options = {}) {
options = {
...options,
moddleExtensions: {
...commonModdleExtensions,
...options.moddleExtensions
}
};
BaseViewer.call(this, options);
}
inherits(Viewer, BaseViewer);
Viewer.prototype._camundaCloudModules = [
...commonModules
];
Viewer.prototype._modules = [].concat(
BaseViewer.prototype._modules,
Viewer.prototype._camundaCloudModules
);