mirror of
https://github.com/bpmn-io/bpmn-js.git
synced 2025-05-17 07:06:32 +08:00

This PR builds on upon diagram-js provided service and event typing: * https://github.com/bpmn-io/diagram-js/pull/862 It allows you to specify (public) types exposed by your BPMN toolkit trough a ServiceMap. Events exposed are parsed from the EventBus dynamic types. Closes #2121
38 lines
908 B
JavaScript
38 lines
908 B
JavaScript
import inherits from 'inherits-browser';
|
|
|
|
import Viewer from './Viewer';
|
|
|
|
import KeyboardMoveModule from 'diagram-js/lib/navigation/keyboard-move';
|
|
import MoveCanvasModule from 'diagram-js/lib/navigation/movecanvas';
|
|
import ZoomScrollModule from 'diagram-js/lib/navigation/zoomscroll';
|
|
|
|
/**
|
|
* @typedef { import('./BaseViewer').BaseViewerOptions } BaseViewerOptions
|
|
*/
|
|
|
|
/**
|
|
* A viewer with mouse and keyboard navigation features.
|
|
*
|
|
* @template [ServiceMap=null]
|
|
*
|
|
* @extends Viewer<ServiceMap>
|
|
*
|
|
* @param {BaseViewerOptions} [options]
|
|
*/
|
|
export default function NavigatedViewer(options) {
|
|
Viewer.call(this, options);
|
|
}
|
|
|
|
inherits(NavigatedViewer, Viewer);
|
|
|
|
|
|
NavigatedViewer.prototype._navigationModules = [
|
|
KeyboardMoveModule,
|
|
MoveCanvasModule,
|
|
ZoomScrollModule
|
|
];
|
|
|
|
NavigatedViewer.prototype._modules = [].concat(
|
|
Viewer.prototype._modules,
|
|
NavigatedViewer.prototype._navigationModules
|
|
); |