mirror of
https://github.com/sartography/bpmn-js.git
synced 2025-01-10 00:55:51 +00:00
bb94b206a7
This allows users to use the viewer / modeler features without inheriting our modules. Related to #258
31 lines
733 B
JavaScript
31 lines
733 B
JavaScript
import inherits from 'inherits';
|
|
|
|
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';
|
|
|
|
|
|
/**
|
|
* A viewer that includes mouse navigation facilities
|
|
*
|
|
* @param {Object} 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
|
|
); |